:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --bg: #f3f5f7;
  --card: #ffffff;
  --text: #111827;
  --sub: #6b7280;
  --muted: #9ca3af;
  --line: #e5e7eb;
  --primary: #0f8f5f;
  --primary-dark: #06734a;
  --primary-soft: #e8f7ef;
  --orange: #f59e0b;
  --red: #dc2626;
  --blue: #2563eb;
  --shadow: 0 18px 46px rgba(17, 24, 39, 0.08);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
}

body {
  min-width: 320px;
  background:
    radial-gradient(circle at 50% -120px, rgba(15, 143, 95, 0.18), transparent 280px),
    linear-gradient(180deg, #f8fafc 0, var(--bg) 360px);
}

[v-cloak] {
  display: none;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

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

svg {
  width: 19px;
  height: 19px;
  stroke-width: 2.2;
}

.login-page {
  min-height: 100vh;
  min-height: 100dvh;
  padding: calc(28px + env(safe-area-inset-top)) 18px 26px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    linear-gradient(180deg, rgba(15, 143, 95, 0.16), rgba(245, 246, 248, 0) 42%),
    var(--bg);
}

.login-top {
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(100%, 430px);
  margin: 0 auto 22px;
}

.app-logo {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #fff;
  background: #111827;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: 0 14px 30px rgba(17, 24, 39, 0.18);
}

.login-top h1 {
  margin: 0 0 4px;
  font-size: 28px;
  letter-spacing: 0;
}

.login-top p {
  margin: 0;
  color: var(--sub);
  font-size: 14px;
}

.login-card,
.card,
.task-card,
.metrics-grid article,
.balance-panel {
  background: var(--card);
  border: 1px solid rgba(229, 231, 235, 0.78);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.login-card {
  width: min(100%, 430px);
  margin: 0 auto;
  padding: 20px;
  display: grid;
  gap: 15px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  color: var(--sub);
  font-size: 13px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  background: #fff;
  color: var(--text);
}

input,
select {
  height: 48px;
  padding: 0 13px;
}

textarea {
  min-height: 86px;
  padding: 12px 13px;
  resize: none;
  line-height: 1.5;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(15, 143, 95, 0.75);
  box-shadow: 0 0 0 4px rgba(15, 143, 95, 0.12);
}

.primary-btn,
.danger-btn,
.claim-btn,
.light-btn,
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 13px;
}

.primary-btn {
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  background: var(--primary);
  color: #fff;
  font-weight: 750;
  box-shadow: 0 12px 24px rgba(15, 143, 95, 0.22);
}

.danger-btn {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
  font-weight: 750;
}

.primary-btn:active,
.danger-btn:active,
.claim-btn:active,
.light-btn:active,
.icon-btn:active {
  transform: translateY(1px);
}

.mobile-app {
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: calc(82px + env(safe-area-inset-bottom));
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: calc(12px + env(safe-area-inset-top)) 14px 12px;
  background: rgba(248, 250, 252, 0.9);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.65);
}

.user-line {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #111827;
  color: #fff;
  font-weight: 800;
}

.user-meta {
  min-width: 0;
  display: grid;
  gap: 2px;
  flex: 1;
}

.user-meta strong,
.user-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-meta strong {
  font-size: 15px;
}

.user-meta span {
  color: var(--sub);
  font-size: 12px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
}

.balance-panel {
  margin-top: 12px;
  padding: 18px;
  background:
    radial-gradient(circle at 88% 18%, rgba(255, 255, 255, 0.22), transparent 92px),
    linear-gradient(135deg, #0b1828 0%, #0d3d30 56%, #119866 100%);
  color: #fff;
  border: 0;
  box-shadow: 0 18px 38px rgba(16, 24, 39, 0.2);
}

.balance-panel span {
  display: block;
  color: rgba(255, 255, 255, 0.74);
  font-size: 13px;
}

.balance-panel strong {
  display: block;
  margin: 6px 0 10px;
  font-size: clamp(32px, 10vw, 44px);
  line-height: 1;
  letter-spacing: 0;
}

.balance-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.balance-row em {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  color: rgba(255, 255, 255, 0.88);
  font-style: normal;
  font-size: 12px;
}

.app-content {
  padding: 14px;
}

.page-stack {
  display: grid;
  gap: 14px;
}

.page-toast,
.floating-toast {
  padding: 11px 13px;
  border-radius: 13px;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  font-size: 14px;
}

.floating-toast {
  width: min(calc(100% - 36px), 430px);
  margin: 14px auto 0;
}

.page-toast.error,
.floating-toast.error {
  background: #fff7ed;
  color: #c2410c;
  border-color: #fed7aa;
}

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

.metrics-grid article {
  padding: 14px;
  display: grid;
  gap: 8px;
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.045);
}

.metrics-grid span,
.caption,
.task-info span,
.summary-list span,
.record-time,
.record-grid span,
.mini-row span {
  color: var(--sub);
  font-size: 12px;
}

.metrics-grid strong {
  font-size: 20px;
  line-height: 1.1;
}

.task-card,
.card {
  padding: 16px;
}

.task-card {
  position: relative;
  overflow: hidden;
}

.task-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 116px;
  background: linear-gradient(180deg, rgba(15, 143, 95, 0.09), transparent);
  pointer-events: none;
}

.task-card > * {
  position: relative;
}

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

.section-title.compact {
  margin-bottom: 14px;
}

.section-title h2 {
  margin: 0 0 4px;
  font-size: 18px;
}

.section-title p {
  margin: 0;
  color: var(--sub);
  font-size: 13px;
  line-height: 1.45;
}

.status-pill {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 9px;
  border-radius: 999px;
  background: #f3f4f6;
  color: var(--sub);
  font-size: 12px;
  font-style: normal;
  white-space: nowrap;
}

.count-pill {
  min-width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 9px;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.status-pill.locked,
.status-pill.pending_check,
.status-pill.pending {
  background: #fff7ed;
  color: #c2410c;
}

.status-pill.confirmed,
.status-pill.paid {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.status-pill.expired,
.status-pill.cancelled,
.status-pill.rejected {
  background: #f3f4f6;
  color: #4b5563;
}

.status-pill.abnormal {
  background: #fef2f2;
  color: var(--red);
}

.phone-task {
  margin-top: 18px;
  display: grid;
  gap: 15px;
}

.phone-copy {
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
}

.phone-copy svg {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  color: var(--primary);
}

.phone-number {
  min-width: 0;
  font-size: clamp(34px, 10.8vw, 46px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
  font-variant-numeric: tabular-nums;
}

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

.task-info div,
.summary-list div,
.record-grid div {
  min-width: 0;
  padding: 12px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  display: grid;
  gap: 5px;
}

.task-info strong {
  font-size: 22px;
}

.auto-tip {
  margin: -2px 0 0;
  padding: 10px 12px;
  border-radius: 13px;
  background: #f8fafc;
  color: var(--sub);
  border: 1px solid #eef2f7;
  font-size: 13px;
  line-height: 1.45;
}

.auto-tip.active {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.auto-tip.pending {
  background: #fffbeb;
  color: #92400e;
  border-color: #fde68a;
}

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

.query-meta div {
  min-width: 0;
  padding: 11px 12px;
  border-radius: 13px;
  background: #fffaf0;
  border: 1px solid #fdecc8;
  display: grid;
  gap: 5px;
}

.query-meta span {
  color: #9a5b0c;
  font-size: 12px;
}

.query-meta strong {
  min-width: 0;
  color: #78350f;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pending-card {
  background: linear-gradient(180deg, #fffdf7, #fff);
}

.pending-list {
  display: grid;
  gap: 10px;
}

.pending-row {
  padding: 12px;
  border-radius: 15px;
  background: #fffaf0;
  border: 1px solid #fdecc8;
}

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

.pending-head strong {
  min-width: 0;
  font-size: 20px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.pending-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.pending-grid div,
.pending-time {
  min-width: 0;
  padding: 10px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #f7e3bc;
  display: grid;
  gap: 5px;
}

.pending-grid span,
.pending-time span {
  color: #9a5b0c;
  font-size: 12px;
}

.pending-grid b,
.pending-time strong {
  min-width: 0;
  color: #78350f;
  font-size: 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pending-time {
  margin-top: 8px;
}

.pending-note {
  margin: 10px 0 0;
  padding: 9px 10px;
  border-radius: 12px;
  background: rgba(251, 191, 36, 0.14);
  color: #92400e;
  font-size: 12px;
  line-height: 1.45;
  word-break: break-all;
}

.warn {
  color: var(--red);
}

.submit-btn {
  margin-top: 4px;
}

.empty-task {
  min-height: 188px;
  display: grid;
  place-items: center;
  gap: 12px;
  padding-top: 10px;
}

.empty-icon {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: var(--primary-soft);
  color: var(--primary);
}

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

.claim-btn {
  width: 100%;
  min-height: 54px;
  background: #111827;
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  box-shadow: 0 14px 28px rgba(17, 24, 39, 0.18);
}

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

.summary-list strong {
  font-size: 20px;
}

.filter-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 1px 0 3px;
  scrollbar-width: none;
}

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

.filter-scroll button {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: #fff;
  color: var(--sub);
  border: 1px solid var(--line);
}

.filter-scroll button.active {
  background: #111827;
  color: #fff;
  border-color: #111827;
}

.record-list,
.mini-list,
.form-stack {
  display: grid;
  gap: 10px;
}

.record-card,
.empty-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 15px;
  box-shadow: 0 10px 26px rgba(17, 24, 39, 0.05);
}

.empty-card {
  color: var(--sub);
  text-align: center;
  padding: 28px 12px;
}

.empty-card.inline {
  box-shadow: none;
  background: #f8fafc;
}

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

.record-head strong {
  font-size: 20px;
}

.record-time {
  margin-top: 6px;
}

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

.record-grid b {
  font-size: 17px;
}

.record-note {
  margin: 12px 0 0;
  padding: 10px;
  border-radius: 12px;
  background: #fff7ed;
  color: #c2410c;
  font-size: 13px;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--sub);
  font-size: 13px;
}

.light-btn {
  min-width: 92px;
  min-height: 40px;
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
}

.withdraw-box {
  display: grid;
  gap: 12px;
}

.amount-input {
  height: 58px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 0 14px;
  background: #fff;
}

.amount-input span {
  font-size: 23px;
  font-weight: 850;
}

.amount-input input {
  border: 0;
  box-shadow: none;
  padding: 0;
  height: 54px;
  font-size: 24px;
  font-weight: 800;
}

.mini-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  min-height: 58px;
  padding: 12px;
  border-radius: 15px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
}

.mini-row div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.mini-row strong,
.mini-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-row em {
  color: var(--text);
  font-style: normal;
  font-weight: 750;
  white-space: nowrap;
}

.mini-row em.income {
  color: var(--primary);
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 7px 10px calc(7px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(18px);
  border-top: 1px solid rgba(229, 231, 235, 0.88);
  box-shadow: 0 -12px 34px rgba(17, 24, 39, 0.08);
}

.bottom-nav button {
  min-width: 0;
  min-height: 54px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 16px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
}

.bottom-nav button.active {
  color: var(--primary);
  background: var(--primary-soft);
  font-weight: 800;
}

.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 14px;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(6px);
}

.confirm-sheet {
  width: min(100%, 402px);
  padding: 10px 16px calc(16px + env(safe-area-inset-bottom));
  border-radius: 24px 24px 18px 18px;
  background: #fff;
  box-shadow: 0 -16px 48px rgba(15, 23, 42, 0.18);
}

.sheet-handle {
  width: 38px;
  height: 4px;
  margin: 0 auto 16px;
  border-radius: 999px;
  background: #d1d5db;
}

.confirm-sheet h3 {
  margin: 0 0 8px;
  font-size: 19px;
}

.confirm-sheet p {
  margin: 0;
  color: var(--sub);
  font-size: 14px;
  line-height: 1.55;
}

.reason-field {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.reason-field span {
  color: var(--sub);
  font-size: 13px;
}

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

.sheet-cancel,
.sheet-danger {
  min-height: 48px;
  border-radius: 14px;
  font-weight: 800;
}

.sheet-cancel {
  background: #f3f4f6;
  color: var(--text);
}

.sheet-danger {
  background: #dc2626;
  color: #fff;
}

@media (min-width: 560px) {
  body {
    display: flex;
    justify-content: center;
    background: #e9edf0;
  }

  #app {
    width: 430px;
    min-height: 100vh;
    background: var(--bg);
    box-shadow: 0 0 0 1px rgba(17, 24, 39, 0.08);
  }

  .bottom-nav {
    left: 50%;
    right: auto;
    width: 430px;
    transform: translateX(-50%);
  }

  .sheet-mask {
    left: 50%;
    right: auto;
    width: 430px;
    transform: translateX(-50%);
  }
}

@media (max-width: 360px) {
  .app-content,
  .app-header {
    padding-left: 10px;
    padding-right: 10px;
  }

  .metrics-grid,
  .summary-list,
  .task-info {
    gap: 8px;
  }

  .metrics-grid article,
  .task-info div,
  .summary-list div {
    padding: 11px;
  }

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

  .phone-number {
    font-size: clamp(32px, 10.4vw, 40px);
  }
}
