:root {
  --paper: #f4f6f2;
  --card: #ffffff;
  --line: #dde6df;
  --text: #17211c;
  --muted: #65736d;
  --green: #116b4f;
  --green-dark: #0a4f3a;
  --red: #b42318;
  --yellow: #fff4c7;
  --soft: #f7faf8;
  --shadow: 0 10px 28px rgba(22, 42, 32, 0.06);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  overflow-x: hidden;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, #edf4ef 0%, #f8f8f2 44%, #eef3f1 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
}

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

button {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 2px 0 rgba(10, 79, 58, 0.18);
  cursor: pointer;
}

button.ghost {
  background: var(--soft);
  color: var(--green);
  border: 1px solid #aac8bb;
  box-shadow: none;
}

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

button.small-btn {
  min-height: 34px;
  padding: 0 10px;
  font-size: 13px;
}

button:disabled {
  opacity: 0.55;
}

.app {
  width: min(100%, 520px);
  height: 100dvh;
  min-height: 100vh;
  margin: 0 auto;
  padding: 12px 12px 86px;
  overflow-x: hidden;
  overflow-y: scroll;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

body.short-page {
  overflow-y: auto;
}

body.short-page .app {
  height: auto;
  min-height: 0;
  padding-bottom: 12px;
  overflow: visible;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}

.page-head {
  display: grid;
  grid-template-columns: 54px 1fr;
  align-items: center;
  gap: 10px;
  padding: 10px;
}

.page-head button {
  min-height: 38px;
  padding: 0;
}

.menu-panel {
  display: grid;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 14px;
  border-top: 1px solid var(--line);
  cursor: pointer;
}

.menu-item:first-child {
  border-top: 0;
}

.menu-right {
  flex-shrink: 0;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
}

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

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

.account-panel {
  padding: 10px 12px;
  border-color: #d4e4dc;
  background: rgba(255, 255, 255, 0.96);
}

.account-top {
  align-items: center;
}

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

.account-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.identity-switch {
  display: grid;
  gap: 5px;
  min-width: 118px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.identity-switch select {
  width: 100%;
  min-height: 38px;
  padding: 0 28px 0 10px;
  border: 1px solid #aac8bb;
  border-radius: 8px;
  background: var(--soft);
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 800;
}

.avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #dce5e1;
  background: var(--soft);
}

.avatar.large {
  width: 62px;
  height: 62px;
  flex-basis: 62px;
}

.avatar-placeholder {
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--green);
  font-size: 22px;
  font-weight: 800;
}

.inline-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.verified-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: #dff3e7;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}

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

.title {
  font-size: 19px;
  font-weight: 800;
}

.section-title {
  font-size: 18px;
  font-weight: 800;
}

.money {
  color: var(--red);
  font-size: 34px;
  font-weight: 800;
  line-height: 1.15;
}

.small-money {
  color: var(--red);
  font-size: 22px;
  font-weight: 800;
}

.grid2,
.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.primary-wide {
  grid-column: span 2;
}

.status {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.status-pending {
  background: var(--yellow);
  color: #8a5a00;
}

.status-confirmed {
  background: #dff3e7;
  color: var(--green);
}

.status-disputed {
  background: #ffe0d8;
  color: #a73516;
}

.status-settled {
  background: #e7e2d8;
  color: #575045;
}

.list-item {
  border-top: 1px solid var(--line);
  padding: 12px 0;
}

.list-item:first-child {
  border-top: 0;
}

.list-item.clickable {
  cursor: pointer;
}

.record-head {
  margin-bottom: 8px;
}

.record-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.record-summary div {
  padding: 10px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  text-align: center;
}

.record-summary strong,
.record-summary span {
  display: block;
}

.record-summary strong {
  color: var(--red);
  font-size: 20px;
}

.record-summary span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.record-card {
  border-top: 1px solid var(--line);
  padding: 12px 0;
}

.record-card:first-child {
  border-top: 0;
}

.detail-record-card {
  margin-top: 8px;
  padding: 10px;
  border: 1px solid #e0e6e9;
  border-radius: 8px;
  background: #fff;
}

.detail-record-card:first-child {
  border-top: 1px solid #e0e6e9;
}

.ledger-dimensions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(76px, 1fr));
  gap: 8px;
  margin: 12px 0 8px;
}

.ledger-dimensions button {
  min-height: 38px;
  padding: 0;
  background: var(--soft);
  color: var(--muted);
  border: 1px solid var(--line);
  box-shadow: none;
  font-size: 13px;
}

.ledger-dimensions button.active {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}

.ledger-list {
  margin-top: 8px;
  border-top: 1px solid var(--line);
}

.ledger-item {
  border-top: 1px solid var(--line);
}

.ledger-item:first-child {
  border-top: 0;
}

.ledger-item.open {
  margin: 10px -6px;
  overflow: hidden;
  border: 1px solid #aac8bb;
  border-radius: 10px;
  background: #f5fbf8;
}

.ledger-item.open + .ledger-item {
  border-top: 0;
}

.ledger-group {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  cursor: pointer;
}

.ledger-group > div:first-child {
  min-width: 0;
}

.ledger-group.active {
  padding: 12px 10px;
  border-bottom: 1px solid #cfe3d8;
  background: #edf8f2;
}

.ledger-mini {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.ledger-mini span,
.open-link {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 7px;
  border-radius: 5px;
  background: var(--soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.open-link {
  justify-content: center;
  margin-top: 6px;
  color: var(--green);
  background: #dff3e7;
}

.full-btn {
  width: 100%;
  margin-top: 10px;
}

.ledger-detail-panel {
  margin: 10px;
  padding: 10px;
  border: 1px solid #d8e0e3;
  border-left: 4px solid #4e6575;
  border-radius: 8px;
  background: #f8fafb;
}

.ledger-detail-panel.all-details {
  margin: 12px 0 0;
}

.detail-strip {
  padding-bottom: 8px;
  border-bottom: 1px solid #d8e0e3;
}

.detail-title {
  color: #23313a;
  font-size: 16px;
  font-weight: 800;
}

.soft-empty-panel {
  background: rgba(255, 255, 255, 0.72);
  box-shadow: none;
}

.empty.compact {
  padding: 22px 10px;
}

.record-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.inline-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.inline-actions button {
  min-height: 42px;
}

.danger-text {
  color: var(--red) !important;
  border-color: #efb3a6 !important;
  background: #fff6f3 !important;
}

.log-title {
  font-weight: 800;
  margin-bottom: 4px;
}

.right {
  text-align: right;
  flex-shrink: 0;
}

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

.tabs.five {
  grid-template-columns: repeat(5, 1fr);
}

.tabs button {
  min-height: 40px;
  padding: 0;
  background: var(--card);
  color: var(--muted);
  border: 1px solid var(--line);
  font-size: 14px;
}

.tabs button.active {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}

.hero-panel {
  background: linear-gradient(180deg, #ffffff 0%, #f3f9f5 100%);
}

.home-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.home-main-btn {
  grid-column: 1;
  width: 100%;
  margin-top: 4px;
}

.home-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.home-action-card {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  grid-template-areas:
    "icon main"
    "value value";
  align-items: center;
  min-height: 116px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  text-align: left;
  box-shadow: var(--shadow);
}

.home-action-card.urgent {
  border-color: #c8dfd5;
  background: #f8fcfa;
}

.home-action-icon {
  grid-area: icon;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #e6f3ee;
  color: var(--green);
  font-size: 16px;
  font-weight: 900;
}

.home-action-main {
  grid-area: main;
  min-width: 0;
}

.home-action-main strong,
.home-action-main em,
.home-action-value {
  display: block;
}

.home-action-main strong {
  color: var(--text);
  font-size: 16px;
  line-height: 1.25;
}

.home-action-main em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
}

.home-action-value {
  grid-area: value;
  align-self: end;
  margin-top: 12px;
  color: var(--green);
  font-size: 15px;
  font-weight: 900;
}

.bill-hero {
  background: #fff;
}

.next-step {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--soft);
  color: var(--green-dark);
  font-weight: 800;
  line-height: 1.45;
}

.hero-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 8px;
}

.hero-foot {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 8px;
  margin-top: 14px;
}

.sign-btn {
  min-height: 52px;
}

.mini-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.mini-metrics div {
  padding: 10px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: center;
}

.mini-metrics span,
.mini-metrics strong {
  display: block;
}

.mini-metrics span {
  color: var(--muted);
  font-size: 12px;
}

.mini-metrics strong {
  margin-top: 4px;
  color: var(--red);
  font-size: 18px;
}

.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 2px;
}

.section-count {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.field {
  margin-bottom: 13px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-weight: 800;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid #ccd9d4;
  border-radius: 8px;
  background: #fbfcfb;
  padding: 0 12px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid rgba(17, 107, 79, 0.18);
  border-color: var(--green);
}

.code-row {
  display: grid;
  grid-template-columns: 1fr 96px;
  gap: 8px;
}

.upload-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.upload-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 6px;
  background: var(--green);
  color: #fff;
  font-weight: 800;
  overflow: hidden;
}

.upload-btn input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.profile-form-head {
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.avatar-upload {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 72px;
  height: 72px;
  cursor: pointer;
}

.avatar-upload .avatar {
  width: 72px;
  height: 72px;
  flex-basis: 72px;
}

.avatar-upload::after {
  content: "换";
  position: absolute;
  right: -2px;
  bottom: -2px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.avatar-upload input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.avatar-upload.top-avatar {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
}

.avatar-upload.top-avatar .avatar {
  width: 48px;
  height: 48px;
  flex-basis: 48px;
}

.avatar-upload.top-avatar::after {
  width: 22px;
  height: 22px;
  font-size: 11px;
}

.field textarea {
  min-height: 72px;
  padding-top: 10px;
}

.notice {
  margin-top: 12px;
  padding: 10px;
  border-radius: 6px;
  background: #fff2c2;
  color: #735300;
  line-height: 1.45;
  font-size: 14px;
}

.notice-ok {
  background: #dff3e7;
  color: var(--green);
}

.login-hero {
  margin-top: 28px;
  padding: 24px 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f1f8f4 100%);
  text-align: center;
}

.login-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 24px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(17, 107, 79, 0.22);
}

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

.login-form button[data-action="login"] {
  width: 100%;
  margin-top: 4px;
}

.profile-score {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--red);
  font-weight: 800;
}

.notice.compact {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-weight: 800;
}

.check-row input {
  width: 20px;
  height: 20px;
}

.amount-box,
.points-box {
  background: var(--yellow);
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 13px;
}

.relation-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 14px 0 4px;
}

.relation-summary div {
  padding: 10px 8px;
  border-radius: 6px;
  background: var(--soft);
  text-align: center;
}

.relation-summary strong,
.relation-summary span {
  display: block;
}

.relation-summary span {
  color: var(--muted);
  font-size: 13px;
}

.relation-summary strong {
  color: var(--red);
  font-weight: 800;
  margin-top: 4px;
}

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

.choice-chip {
  min-height: 42px;
  background: var(--soft);
  color: var(--green);
  border: 1px solid #aac8bb;
  font-size: 15px;
}

.choice-chip.active {
  background: var(--green);
  color: #fff;
}

.select-action-row {
  display: grid;
  grid-template-columns: 1fr 96px;
  gap: 8px;
}

.location-card {
  display: grid;
  grid-template-columns: 64px 1fr;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.map-thumb {
  position: relative;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(17, 107, 79, 0.18) 1px, transparent 1px),
    linear-gradient(rgba(17, 107, 79, 0.14) 1px, transparent 1px),
    #e9f4ef;
  background-size: 18px 18px;
}

.map-thumb span,
.map-pin {
  position: absolute;
  width: 12px;
  height: 12px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.map-thumb span {
  left: 25px;
  top: 18px;
}

.map-picker {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #c9d8d2;
  border-radius: 8px;
  background: #f9fbfa;
}

.map-canvas {
  position: relative;
  height: 126px;
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(135deg, transparent 0 48%, rgba(17, 107, 79, 0.16) 48% 52%, transparent 52%),
    linear-gradient(45deg, transparent 0 52%, rgba(180, 35, 24, 0.12) 52% 56%, transparent 56%),
    linear-gradient(90deg, rgba(17, 107, 79, 0.12) 1px, transparent 1px),
    linear-gradient(rgba(17, 107, 79, 0.1) 1px, transparent 1px),
    #eaf3ef;
  background-size: auto, auto, 24px 24px, 24px 24px;
  margin-bottom: 12px;
}

.pin-1 { left: 18%; top: 42%; }
.pin-2 { left: 38%; top: 22%; }
.pin-3 { left: 58%; top: 54%; }
.pin-4 { left: 76%; top: 32%; }
.pin-5 { left: 28%; top: 68%; }
.pin-6 { left: 68%; top: 70%; }

.map-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.map-location-list {
  display: grid;
  gap: 8px;
}

.map-location {
  display: grid;
  min-height: 56px;
  padding: 8px 10px;
  text-align: left;
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: none;
}

.map-location span {
  font-weight: 800;
}

.map-location small {
  color: var(--muted);
}

.map-location.current {
  border-color: #aac8bb;
  color: var(--green);
}

.other-row {
  display: grid;
  grid-template-columns: 96px 1fr;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.other-row input {
  min-height: 40px;
}

.voice-note,
.voice-detail {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--soft);
}

.voice-note audio,
.voice-detail audio {
  width: 100%;
}

.voice-status {
  color: var(--muted);
  line-height: 1.45;
}

.voice-status.strong {
  color: var(--text);
  font-weight: 800;
}

.send-grid.compact {
  margin: 0;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid #eee6d8;
}

.timeline-item:first-of-type {
  border-top: 0;
}

.timeline-dot {
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--green);
}

.product-card {
  padding: 0;
  overflow: hidden;
}

.address-panel {
  border-color: #d4e4dc;
}

.shop-head-side {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.address-page-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.address-card,
.address-empty {
  padding: 14px;
  border-radius: 8px;
  background: var(--soft);
}

.address-card {
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
}

.address-main {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 12px;
}

.address-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-weight: 900;
}

.address-name {
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
}

.address-name span {
  margin-left: 6px;
  font-size: 16px;
}

.address-detail {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.45;
}

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

.clean-empty {
  display: grid;
  gap: 4px;
  min-height: 106px;
  place-content: center;
  text-align: center;
}

.address-empty-title {
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
}

.address-primary {
  width: 100%;
  min-height: 48px;
}

.send-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 0;
}

.send-grid button {
  min-height: 42px;
}

.share-card {
  padding: 12px;
  background: var(--soft);
  border-radius: 6px;
  border: 1px solid var(--line);
  margin-bottom: 12px;
}

.wechat-card-preview {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  margin: 12px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.wechat-card-preview img {
  width: 112px;
  height: 86px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: var(--soft);
}

.wechat-card-preview.compact-card {
  margin-top: 0;
}

.boss-hero {
  background: linear-gradient(180deg, #ffffff 0%, #f4fbf8 100%);
}

.boss-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.boss-metrics div {
  padding: 12px 8px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
  text-align: center;
}

.boss-metrics strong,
.boss-metrics span {
  display: block;
}

.boss-metrics strong {
  color: var(--red);
  font-size: 20px;
}

.boss-metrics span {
  color: var(--muted);
  font-size: 13px;
  margin-top: 3px;
}

.share-code {
  font-size: 22px;
  font-weight: 800;
  color: var(--green);
  margin: 6px 0;
}

.share-link {
  word-break: break-all;
  color: #5c564d;
  font-size: 13px;
}

.share-history {
  display: grid;
  gap: 8px;
}

.share-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-top: 1px solid #eee6d8;
  color: #5c564d;
  font-size: 14px;
}

.share-row:first-child {
  border-top: 0;
}

.product-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--soft);
  border-bottom: 1px solid var(--line);
}

.product-body {
  padding: 16px;
}

.compact-product {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px;
}

.compact-product .product-image {
  width: 118px;
  height: 118px;
  aspect-ratio: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.compact-product .product-body {
  min-width: 0;
  padding: 0;
}

.compact-product .row {
  align-items: flex-start;
}

.compact-product .title {
  font-size: 17px;
}

.compact-product .small-money {
  flex-shrink: 0;
  font-size: 18px;
  white-space: nowrap;
}

.product-summary {
  margin: 12px 0;
  color: #3d403a;
  line-height: 1.55;
}

.compact-product .product-summary {
  display: -webkit-box;
  margin: 7px 0;
  overflow: hidden;
  color: #4f5a55;
  font-size: 14px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 10px;
}

.product-tags span {
  max-width: 100%;
  padding: 4px 7px;
  overflow: hidden;
  border-radius: 5px;
  background: var(--soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-product .actions {
  gap: 8px;
}

.compact-product .actions button {
  min-height: 38px;
}

.checkout-product {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
}

.checkout-image {
  width: 116px;
  height: 116px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.checkout-product-main {
  min-width: 0;
}

.checkout-price {
  margin-top: 8px;
  color: var(--red);
  font-size: 22px;
  font-weight: 900;
}

.checkout-address {
  border-color: #d4e4dc;
}

.checkout-summary {
  display: grid;
  gap: 10px;
}

.product-info {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.product-info div {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--soft);
}

.product-info strong {
  color: var(--green);
}

.product-info span {
  color: #5c564d;
}

.order-row {
  align-items: flex-start;
}

.order-image {
  width: 76px;
  height: 62px;
  flex: 0 0 76px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--soft);
}

.detail-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-top: 1px solid #eee6d8;
}

.detail-row span:first-child {
  color: var(--muted);
}

.detail-row span:last-child {
  text-align: right;
  font-weight: 800;
}

.note {
  margin-top: 12px;
  padding: 10px;
  border-radius: 6px;
  background: var(--soft);
  color: #5c564d;
  white-space: pre-wrap;
}

.tabbar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  width: min(100%, 520px);
  margin: 0 auto;
  padding: 8px 8px max(8px, env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px rgba(17, 42, 31, 0.08);
  touch-action: manipulation;
}

body.short-page .tabbar {
  position: relative;
  right: auto;
  bottom: auto;
  left: auto;
  margin: 0 auto 12px;
}

.tabbar button {
  min-height: 42px;
  background: transparent;
  color: #6f6a60;
  font-size: 13px;
  padding: 0;
}

.tabbar button.active {
  color: var(--green);
  background: #e9f4ef;
}

@media (max-width: 380px) {
  .account-top {
    align-items: center;
  }

  .account-tools {
    min-width: 118px;
  }

  .hero-foot {
    grid-template-columns: 1fr;
  }

  .compact-product {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
  }

  .compact-product .product-image {
    width: 96px;
    height: 96px;
  }

  .product-tags span:nth-child(n+2) {
    display: none;
  }
}

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

.toast {
  position: fixed;
  left: 50%;
  bottom: 82px;
  z-index: 10;
  transform: translateX(-50%);
  max-width: calc(100vw - 40px);
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(32, 35, 31, 0.92);
  color: #fff;
  font-size: 14px;
}

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 14px;
  background: rgba(23, 33, 28, 0.28);
}

.action-sheet {
  width: min(100%, 492px);
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 -18px 42px rgba(17, 42, 31, 0.18);
}

.sheet-title {
  margin-bottom: 12px;
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
}

.sheet-options {
  display: grid;
  gap: 8px;
}

.sheet-options button,
.sheet-cancel {
  width: 100%;
  min-height: 46px;
}

.sheet-cancel {
  margin-top: 10px;
  background: #f4f6f2;
  color: #5c564d;
  box-shadow: none;
}

@media (min-width: 760px) {
  body {
    background: #dfe8e4;
  }

  .app {
    height: calc(100dvh - 40px);
    margin-top: 20px;
    margin-bottom: 20px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    box-shadow: 0 18px 44px rgba(17, 42, 31, 0.12);
  }
}

/* 2026-05 UI polish: calmer, more tactile mini-program surface */
:root {
  --paper: #eef3ef;
  --card: #fffdf8;
  --line: #dbe3dc;
  --text: #15211c;
  --muted: #66746e;
  --green: #0f6a4d;
  --green-dark: #073f30;
  --red: #b9482d;
  --orange: #e39a2f;
  --yellow: #fff1c7;
  --soft: #f5f8f5;
  --shadow: 0 10px 30px rgba(18, 38, 29, 0.08);
  --strong-shadow: 0 18px 48px rgba(18, 38, 29, 0.16);
}

body {
  background:
    radial-gradient(circle at 20% -10%, rgba(227, 154, 47, 0.18), transparent 28%),
    radial-gradient(circle at 100% 0%, rgba(15, 106, 77, 0.16), transparent 30%),
    linear-gradient(180deg, #eef4f0 0%, #f8f4e8 48%, #edf3f0 100%);
  letter-spacing: 0;
}

.app {
  padding: 10px 12px 94px;
}

.panel {
  border: 1px solid rgba(31, 54, 44, 0.08);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.96);
  box-shadow: var(--shadow);
}

button {
  min-height: 48px;
  border-radius: 14px;
  background: linear-gradient(180deg, #147557 0%, #0e5e46 100%);
  box-shadow: 0 7px 16px rgba(15, 106, 77, 0.18);
}

button.ghost {
  background: #f5faf7;
  border-color: #c9ddd3;
  color: var(--green-dark);
}

button.small-btn {
  border-radius: 12px;
}

.account-panel {
  position: sticky;
  top: 8px;
  z-index: 5;
  padding: 11px 12px;
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 253, 248, 0.86);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 28px rgba(18, 38, 29, 0.11);
}

.avatar {
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 14px rgba(18, 38, 29, 0.14);
}

.avatar-placeholder {
  background: linear-gradient(135deg, #0f6a4d, #e39a2f);
}

.identity-switch {
  min-width: 112px;
}

.identity-switch span {
  display: none;
}

.identity-switch select {
  min-height: 40px;
  border-color: rgba(15, 106, 77, 0.16);
  border-radius: 999px;
  background: #eaf5ef;
  color: var(--green-dark);
}

.verified-badge {
  background: #e5f4ec;
  color: #0b5b43;
}

.muted {
  color: var(--muted);
  line-height: 1.42;
}

.title,
.section-title,
.log-title {
  color: var(--text);
  font-weight: 900;
}

.money {
  color: #a63c26;
  font-size: 36px;
  letter-spacing: 0;
}

.small-money {
  color: #a63c26;
}

.login-hero,
.hero-panel.home-hero {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  border: 0;
  background:
    linear-gradient(180deg, rgba(5, 30, 24, 0.18), rgba(5, 30, 24, 0.66)),
    url("/web/assets/ui/labor-hero.png") center / cover no-repeat;
  color: #fff;
  box-shadow: var(--strong-shadow);
}

.login-hero::after,
.hero-panel.home-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 34, 27, 0.04) 0%, rgba(8, 34, 27, 0.72) 100%);
  pointer-events: none;
}

.login-hero > *,
.hero-panel.home-hero > * {
  position: relative;
  z-index: 1;
}

.login-hero {
  display: grid;
  align-content: end;
  gap: 8px;
  margin-top: 24px;
  padding: 96px 18px 20px;
  text-align: left;
}

.login-hero .title,
.login-hero .muted,
.home-hero .title,
.home-hero .muted,
.home-hero .money {
  color: #fff;
}

.login-mark {
  margin: 0 0 4px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: none;
  backdrop-filter: blur(10px);
}

.login-form {
  padding: 18px;
}

.home-hero {
  align-content: end;
  padding: 92px 18px 18px;
}

.home-main-btn {
  margin-top: 8px;
  background: #fff;
  color: var(--green-dark);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}

.hero-line {
  color: rgba(255, 255, 255, 0.82);
}

.boss-metrics {
  margin-top: 12px;
}

.boss-metrics div {
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

.boss-metrics strong,
.boss-metrics span {
  color: #fff;
}

.home-action-grid {
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.home-action-card {
  min-height: 124px;
  border: 0;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(250, 248, 241, 0.98) 100%);
  box-shadow: var(--shadow);
}

.home-action-card.urgent {
  background:
    linear-gradient(180deg, rgba(255, 248, 229, 0.98) 0%, rgba(255, 253, 248, 1) 100%);
}

.home-action-icon {
  border-radius: 14px;
  background: #eaf5ef;
  color: var(--green-dark);
}

.home-action-value {
  color: #a63c26;
  font-size: 17px;
}

.page-head {
  grid-template-columns: 48px 1fr;
}

.page-head button {
  border-radius: 14px;
}

.field label {
  margin-bottom: 8px;
  color: #26342f;
  font-size: 15px;
}

.field input,
.field select,
.field textarea {
  min-height: 50px;
  border-color: rgba(38, 58, 49, 0.14);
  border-radius: 14px;
  background: #fff;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 3px solid rgba(15, 106, 77, 0.12);
}

.amount-box,
.points-box {
  border: 1px solid rgba(227, 154, 47, 0.22);
  border-radius: 16px;
  background: linear-gradient(180deg, #fff4d8, #fffaed);
}

.location-card,
.voice-note,
.voice-detail,
.map-picker,
.address-card,
.address-empty,
.share-card,
.note {
  border-radius: 16px;
}

.list-item,
.record-card {
  padding: 14px 0;
}

.record-card.detail-record-card,
.ledger-detail-panel {
  border-radius: 16px;
  background: #f8faf8;
}

.record-summary div,
.relation-summary div,
.mini-metrics div {
  border: 0;
  border-radius: 16px;
  background: #f5f8f5;
}

.tabs,
.ledger-dimensions {
  padding: 4px;
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.72);
  box-shadow: inset 0 0 0 1px rgba(31, 54, 44, 0.06);
}

.tabs button,
.ledger-dimensions button {
  border: 0;
  border-radius: 13px;
  background: transparent;
}

.tabs button.active,
.ledger-dimensions button.active {
  background: var(--green-dark);
  color: #fff;
}

.ledger-item.open {
  border-color: rgba(15, 106, 77, 0.18);
  border-radius: 18px;
  background: #f5fbf8;
}

.ledger-group.active {
  border-radius: 16px 16px 0 0;
  background: #edf8f2;
}

.status {
  border-radius: 999px;
  padding: 5px 9px;
}

.product-card {
  border: 0;
  border-radius: 20px;
  background: #fffdf8;
}

.compact-product {
  grid-template-columns: 108px minmax(0, 1fr);
  padding: 12px;
}

.compact-product .product-image,
.checkout-image,
.order-image,
.wechat-card-preview img {
  border: 0;
  border-radius: 16px;
  background: #eef3ef;
  box-shadow: inset 0 0 0 1px rgba(31, 54, 44, 0.08);
}

.compact-product .product-image {
  width: 108px;
  height: 108px;
}

.product-tags span,
.ledger-mini span,
.open-link {
  border-radius: 999px;
}

.checkout-product {
  border-radius: 20px;
}

.menu-panel {
  border-radius: 20px;
}

.menu-item {
  padding: 17px 15px;
}

.tabbar {
  width: min(calc(100% - 18px), 502px);
  bottom: 8px;
  padding: 7px 7px max(7px, env(safe-area-inset-bottom));
  border: 1px solid rgba(31, 54, 44, 0.08);
  border-radius: 24px;
  background: rgba(255, 253, 248, 0.92);
  box-shadow: 0 14px 38px rgba(18, 38, 29, 0.18);
  backdrop-filter: blur(18px);
}

.tabbar button {
  display: grid;
  min-height: 52px;
  place-items: center;
  gap: 2px;
  border-radius: 18px;
  color: #66746e;
  font-size: 12px;
  font-weight: 800;
}

.tabbar button::before {
  content: "●";
  display: block;
  width: 22px;
  height: 20px;
  color: currentColor;
  font-size: 15px;
  line-height: 20px;
  text-align: center;
}

.tabbar button[data-page="home"]::before { content: "⌂"; }
.tabbar button[data-page="work"]::before { content: "+"; }
.tabbar button[data-page="records"]::before { content: "≡"; }
.tabbar button[data-page="shop"]::before { content: "□"; }
.tabbar button[data-page="profile"]::before { content: "○"; }

.tabbar button.active {
  background: #0f6a4d;
  color: #fff;
}

.toast {
  bottom: 94px;
  background: rgba(21, 33, 28, 0.94);
}

@media (max-width: 380px) {
  .home-action-grid {
    grid-template-columns: 1fr;
  }

  .compact-product {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .compact-product .product-image {
    width: 96px;
    height: 96px;
  }
}

@media (min-width: 760px) {
  body {
    background:
      radial-gradient(circle at 16% 0%, rgba(227, 154, 47, 0.16), transparent 24%),
      linear-gradient(135deg, #dce7e1 0%, #f0e8d8 100%);
  }

  .app {
    border-radius: 28px;
    background: rgba(238, 243, 239, 0.96);
  }

  .tabbar {
    bottom: 28px;
  }
}
