/* ==========================================================================
   肥鱼任务 · 移动端样式
   设计基准：主色 #1B6BFF，深色 #0B1739，背景 #F4F7FC
   移动优先，最大宽度 440px，桌面居中留白
   ========================================================================== */

/* ---------- 1. 变量与基础 ---------- */
:root {
  --blue: #1B6BFF;
  --navy: #0B1739;
  --bg: #F4F7FC;
  --card: #FFFFFF;
  --text: #0F1B33;
  --muted: #6B7A99;
  --orange: #FF7A1A;
  --green: #12B76A;
  --red: #E5484D;
  --line: #E8EEF7;
  --soft: #F0F5FC;
  --r-card: 18px;
  --r-btn: 12px;
  --shadow: 0 6px 20px rgba(15, 27, 51, .06);
  --font: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  color-scheme: light;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: #E8EFF9;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior-y: none;
}

body.no-scroll {
  overflow: hidden;
}

h1, h2, h3, h4, p {
  margin: 0;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

button {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

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

svg {
  display: block;
}

[hidden] {
  display: none !important;
}

/* ---------- 2. 应用外壳与底部导航 ---------- */
.app-shell {
  position: relative;
  width: 100%;
  max-width: 440px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  box-shadow: 0 0 0 1px rgba(15, 27, 51, .03), 0 24px 80px rgba(11, 23, 57, .10);
}

.view {
  min-height: inherit;
}

.tabbar {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 40;
  display: flex;
  width: 100%;
  max-width: 440px;
  padding: 6px 8px calc(6px + var(--safe-bottom));
  transform: translateX(-50%);
  background: rgba(255, 255, 255, .95);
  border-top: 1px solid rgba(15, 27, 51, .06);
  box-shadow: 0 -6px 24px rgba(15, 27, 51, .05);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
}

.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 0 4px;
  color: #8492AC;
  font-size: 11px;
  font-weight: 500;
  transition: color .18s ease, transform .12s ease;
}

.tab .ic {
  width: 23px;
  height: 23px;
}

.tab:active {
  transform: scale(.94);
}

.tab.is-active {
  color: var(--blue);
  font-weight: 600;
}

/* 页面通用留白，给底部导航让位 */
.page {
  padding-bottom: calc(84px + var(--safe-bottom));
  animation: pageIn .24s ease-out both;
}

/* ---------- 3. 通用元素 ---------- */
.ic {
  display: inline-block;
  width: 20px;
  height: 20px;
  flex: none;
  vertical-align: -3px;
}

.ic-sm {
  width: 16px;
  height: 16px;
}

.ic-lg {
  width: 24px;
  height: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: var(--r-btn);
  font-size: 15px;
  font-weight: 600;
  transition: transform .12s ease, opacity .18s ease, background .18s ease;
  user-select: none;
}

.btn:active:not(:disabled) {
  transform: scale(.975);
  opacity: .9;
}

.btn:disabled {
  opacity: .55;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #2D7BFF, #1B6BFF);
  box-shadow: 0 8px 18px rgba(27, 107, 255, .24);
}

.btn-ghost {
  color: #40527A;
  background: var(--soft);
}

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

.btn-block {
  display: flex;
  width: 100%;
}

.btn-sm {
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
  border-radius: 10px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: var(--text);
  transition: background .15s ease, transform .12s ease;
}

.icon-btn:active {
  background: rgba(15, 27, 51, .06);
  transform: scale(.94);
}

.icon-btn .ic {
  width: 22px;
  height: 22px;
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .5px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16);
  transition: transform .12s ease;
}

button.avatar:active {
  transform: scale(.94);
}

.avatar-sm {
  width: 36px;
  height: 36px;
  font-size: 14px;
}

.avatar-lg {
  width: 46px;
  height: 46px;
  font-size: 17px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .18);
}

/* 页面标题（首页以外的一级页） */
.page-head {
  padding: calc(22px + var(--safe-top)) 18px 4px;
}

.page-head h1 {
  font-size: 23px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: .2px;
}

.page-sub {
  margin-top: 5px;
  font-size: 12px;
  color: var(--muted);
}

/* 二级页顶栏 */
.subpage-head {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: calc(8px + var(--safe-top)) 12px 8px;
  background: rgba(244, 247, 252, .94);
  border-bottom: 1px solid rgba(15, 27, 51, .04);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.subpage-head h1 {
  flex: 1;
  font-size: 17px;
  font-weight: 600;
}

.subpage-head .head-side {
  padding-right: 6px;
  font-size: 11px;
  color: var(--muted);
}

/* 区块标题 */
.section {
  margin-top: 22px;
  padding: 0 18px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 11px;
}

.section-head h2 {
  font-size: 16.5px;
  font-weight: 600;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-right: -4px;
  padding: 4px;
  color: var(--muted);
  font-size: 12px;
}

.link-btn:active {
  opacity: .6;
}

/* 字段 */
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 13px;
}

.field > span {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
  color: #4A5C7A;
}

.field > span em {
  color: var(--red);
  font-size: 10.5px;
  font-style: normal;
  font-weight: 400;
}

.field input,
.field textarea {
  width: 100%;
  padding: 12px 13px;
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  background: #F8FAFE;
  border: 1px solid #DEE7F4;
  border-radius: 12px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.field textarea {
  min-height: 104px;
  font-size: 14.5px;
  line-height: 1.6;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #A7B3C7;
}

.field input:focus,
.field textarea:focus {
  background: #fff;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(27, 107, 255, .12);
}

/* 空状态 */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 28px 20px;
  text-align: center;
  background: var(--card);
  border-radius: var(--r-card);
  box-shadow: var(--shadow);
}

.empty-art {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin-bottom: 4px;
  color: #8FB4F8;
  background: linear-gradient(150deg, #EAF2FF, #F8FBFF);
  border-radius: 24px;
}

.empty-art .ic {
  width: 32px;
  height: 32px;
}

.empty h3 {
  font-size: 14.5px;
  font-weight: 600;
}

.empty p {
  max-width: 250px;
  font-size: 12px;
  line-height: 1.65;
  color: var(--muted);
}

/* 骨架屏 */
.sk {
  background: linear-gradient(90deg, #EDF3FA 25%, #F8FBFF 37%, #EDF3FA 63%);
  background-size: 400% 100%;
  border-radius: 8px;
  animation: shimmer 1.5s ease infinite;
}

.sk-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  background: #fff;
  border-radius: var(--r-card);
  box-shadow: var(--shadow);
}

.sk-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sk-circle {
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 50%;
}

.sk-stack {
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding: 0 18px;
}

/* 错误 / 加载状态页 */
.state-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 72vh;
  padding: 40px 28px;
  text-align: center;
  animation: pageIn .2s ease-out both;
}

.state-art {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin-bottom: 6px;
  color: #8FA6C6;
  background: #fff;
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.state-art .ic {
  width: 32px;
  height: 32px;
}

.state-page h2 {
  font-size: 15px;
  font-weight: 600;
}

.state-page p {
  max-width: 260px;
  font-size: 12px;
  line-height: 1.65;
  color: var(--muted);
}

.state-page .btn {
  min-width: 132px;
  margin-top: 12px;
}

/* ---------- 4. 轻提示 Toast ---------- */
.toast-root {
  position: fixed;
  left: 50%;
  bottom: calc(88px + var(--safe-bottom));
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: calc(100% - 40px);
  max-width: 400px;
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  color: #fff;
  font-size: 12.5px;
  line-height: 1.5;
  background: rgba(11, 23, 57, .94);
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(11, 23, 57, .28);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease;
}

.toast.show {
  opacity: 1;
  transform: none;
}

.toast-ic {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 18px;
  height: 18px;
}

.toast-ic .ic {
  width: 17px;
  height: 17px;
}

.toast-success .toast-ic { color: #4ADE9C; }
.toast-error .toast-ic { color: #FF8B8F; }
.toast-info .toast-ic { color: #8CB9FF; }

/* 弹层打开时，提示移到顶部，避免遮住底部弹层的操作按钮 */
body.no-scroll .toast-root {
  top: calc(16px + var(--safe-top));
  bottom: auto;
}

/* ---------- 5. 弹层（底部操作层 / 对话框） ---------- */
.layer {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.layer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 23, 57, .46);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  animation: fadeIn .2s ease;
}

.sheet {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 8px 18px calc(16px + var(--safe-bottom));
  background: #fff;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -12px 40px rgba(11, 23, 57, .2);
  animation: sheetUp .26s cubic-bezier(.22, .8, .28, 1);
}

.sheet-grip {
  width: 38px;
  height: 4px;
  margin: 2px auto 12px;
  background: #E2E9F4;
  border-radius: 2px;
}

.sheet-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 4px;
}

.sheet-head h2 {
  flex: 1;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
}

.sheet-close {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 32px;
  height: 32px;
  color: #7A8AA5;
  background: #F2F6FC;
  border-radius: 50%;
}

.sheet-close .ic {
  width: 16px;
  height: 16px;
}

.sheet-desc {
  margin-bottom: 14px;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--muted);
}

.sheet-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

.layer-center {
  align-items: center;
  padding: 24px;
}

.dialog {
  position: relative;
  width: 100%;
  max-width: 332px;
  padding: 22px 20px 18px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(11, 23, 57, .28);
  animation: dialogIn .2s ease;
}

.dialog h2 {
  font-size: 16.5px;
  font-weight: 600;
}

.dialog p {
  margin-top: 9px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--muted);
}

.dialog-actions {
  display: flex;
  gap: 9px;
  margin-top: 18px;
}

.dialog-actions .btn {
  flex: 1;
  min-height: 44px;
}

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

.about-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  color: #fff;
  background: linear-gradient(145deg, #2D7BFF, #0B1739);
  border-radius: 14px;
  box-shadow: 0 8px 18px rgba(27, 107, 255, .25);
}

.about-logo .ic {
  width: 24px;
  height: 24px;
}

.about-brand b {
  display: block;
  font-size: 15px;
  font-weight: 600;
}

.about-brand small {
  display: block;
  margin-top: 2px;
  font-size: 10.5px;
  color: var(--muted);
}

.about-points {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.about-points li {
  display: flex;
  gap: 7px;
  font-size: 11.5px;
  line-height: 1.6;
  color: #52627E;
}

.about-points li::before {
  content: "";
  flex: none;
  width: 5px;
  height: 5px;
  margin-top: 7px;
  background: #C0D3F2;
  border-radius: 50%;
}

/* 加载转圈 */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

/* ---------- 6. 登录页 ---------- */
.page-login {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: calc(28px + var(--safe-top)) 22px calc(22px + var(--safe-bottom));
  overflow: hidden;
  color: #fff;
  background: linear-gradient(160deg, #0B1739 0%, #10285C 52%, #173E8F 100%);
}

.login-art {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.login-art .blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(10px);
}

.blob-1 {
  top: -120px;
  right: -110px;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(43, 124, 255, .55), rgba(43, 124, 255, 0) 68%);
}

.blob-2 {
  bottom: -90px;
  left: -110px;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(255, 122, 26, .28), rgba(255, 122, 26, 0) 70%);
}

.login-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 42px 42px;
  -webkit-mask-image: radial-gradient(circle at 50% 18%, #000, transparent 72%);
  mask-image: radial-gradient(circle at 50% 18%, #000, transparent 72%);
}

.login-rings {
  position: absolute;
  top: 64px;
  right: -78px;
  width: 300px;
  height: 300px;
  opacity: .55;
}

.login-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 26px;
  text-align: center;
}

.brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: linear-gradient(150deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, .06));
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 20px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .2), inset 0 1px 0 rgba(255, 255, 255, .3);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.brand-logo .ic {
  width: 30px;
  height: 30px;
}

.brand h1 {
  margin-top: 14px;
  font-size: 29px;
  font-weight: 700;
  letter-spacing: 3px;
  text-indent: 3px;
}

.brand p {
  margin-top: 8px;
  font-size: 12.5px;
  letter-spacing: 1.2px;
  color: #A9BCE0;
}

.login-card {
  padding: 20px 18px 16px;
  color: var(--text);
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 20px 50px rgba(4, 12, 30, .35);
}

.login-welcome {
  margin-bottom: 16px;
}

.login-welcome h2 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .3px;
}

.login-welcome p {
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--muted);
}

.login-submit {
  height: 48px;
  margin-top: 4px;
}

.demo {
  margin-top: 12px;
  padding-top: 4px;
  border-top: 1px dashed var(--line);
}

.demo-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  padding: 9px 0 3px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 500;
}

.demo-toggle .ic {
  width: 15px;
  height: 15px;
  transition: transform .2s ease;
}

.demo-toggle[aria-expanded="true"] .ic {
  transform: rotate(180deg);
}

.demo-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.demo-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  text-align: left;
  background: #F6F9FE;
  border-radius: 11px;
  transition: background .15s ease, transform .12s ease;
}

.demo-item:active {
  background: #EDF4FF;
  transform: scale(.985);
}

.demo-item .avatar {
  width: 30px;
  height: 30px;
  font-size: 12px;
  box-shadow: none;
}

.demo-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.demo-name {
  font-size: 12.5px;
  font-weight: 600;
}

.demo-meta {
  display: block;
  margin-top: 1px;
  font-size: 10px;
  color: var(--muted);
}

.demo-go {
  margin-left: auto;
  color: var(--blue);
  font-size: 10.5px;
  font-weight: 500;
}

.login-foot {
  margin-top: 18px;
  font-size: 10.5px;
  letter-spacing: .5px;
  text-align: center;
  color: rgba(255, 255, 255, .42);
}

/* ---------- 7. 首页 ---------- */
.home-hero {
  position: relative;
  padding: calc(18px + var(--safe-top)) 20px 24px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(150deg, #0B1739 0%, #123372 62%, #1B4DB8 100%);
  border-radius: 0 0 28px 28px;
}

.home-hero::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -90px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(65, 146, 255, .55), rgba(65, 146, 255, 0) 68%);
  border-radius: 50%;
}

.home-hero::after {
  content: "";
  position: absolute;
  bottom: -130px;
  left: -110px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(255, 122, 26, .22), rgba(255, 122, 26, 0) 70%);
  border-radius: 50%;
}

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

.hero-greet {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: .2px;
}

.hero-sub {
  margin-top: 5px;
  font-size: 12px;
  color: rgba(255, 255, 255, .62);
}

.hero-money {
  position: relative;
  z-index: 1;
  margin-top: 26px;
}

.hero-money-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  letter-spacing: .5px;
  color: rgba(255, 255, 255, .66);
}

.hero-money-hint {
  padding: 2px 6px;
  font-size: 9px;
  letter-spacing: 0;
  color: rgba(255, 255, 255, .6);
  background: rgba(255, 255, 255, .1);
  border-radius: 5px;
}

.hero-money-value {
  margin-top: 6px;
  color: var(--orange);
  font-size: 42px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.5px;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 4px 18px rgba(255, 122, 26, .22);
}

.hero-money-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
  font-size: 11.5px;
  color: rgba(255, 255, 255, .6);
  font-variant-numeric: tabular-nums;
}

.hero-money-sub .dot {
  width: 3px;
  height: 3px;
  background: rgba(255, 255, 255, .35);
  border-radius: 50%;
}

.rank-chip {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  padding: 7px 12px;
  color: #FFE0C6;
  font-size: 12px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  transition: transform .12s ease, background .18s ease;
}

.rank-chip:active {
  background: rgba(255, 255, 255, .2);
  transform: scale(.97);
}

.rank-chip .ic {
  width: 15px;
  height: 15px;
}

.stat-pills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 16px;
  padding: 0 18px;
}

.stat-pill {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 8px 11px;
  text-align: center;
  background: var(--card);
  border-radius: var(--r-card);
  box-shadow: var(--shadow);
  transition: transform .12s ease;
}

.stat-pill:active {
  transform: scale(.97);
}

.stat-value {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.stat-value.money {
  color: var(--blue);
  font-size: 16px;
}

.stat-label {
  font-size: 10.5px;
  color: var(--muted);
}

.notice-card {
  display: flex;
  gap: 8px;
  margin: 16px 18px 0;
  padding: 11px 13px;
  color: #9A4B0A;
  font-size: 12px;
  line-height: 1.55;
  background: #FFF7ED;
  border: 1px solid #FFE2C2;
  border-radius: 14px;
}

.notice-card .ic {
  width: 15px;
  height: 15px;
  margin-top: 2px;
}

.task-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mini-task {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 13px 14px;
  text-align: left;
  background: var(--card);
  border-radius: var(--r-card);
  box-shadow: var(--shadow);
  transition: transform .12s ease;
}

.mini-task:active {
  transform: scale(.98);
}

.type-ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 38px;
  height: 38px;
  color: var(--type-color, var(--blue));
  background: var(--type-bg, rgba(27, 107, 255, .1));
  border-radius: 50%;
}

.type-ic .ic {
  width: 20px;
  height: 20px;
}

.mini-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.mini-title {
  overflow: hidden;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.mini-right {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.mini-commission {
  color: var(--orange);
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.mini-due {
  font-size: 10px;
  color: #8A97AD;
}

.mini-due.warn { color: #C2740B; }
.mini-due.overdue { color: var(--red); font-weight: 600; }

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

.quick-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 15px 14px;
  overflow: hidden;
  text-align: left;
  background: var(--card);
  border-radius: var(--r-card);
  box-shadow: var(--shadow);
  transition: transform .12s ease;
}

.quick-card:active {
  transform: scale(.97);
}

.quick-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--blue);
  background: rgba(27, 107, 255, .1);
  border-radius: 11px;
}

.quick-card.orange .quick-icon {
  color: var(--orange);
  background: rgba(255, 122, 26, .12);
}

.quick-icon .ic {
  width: 19px;
  height: 19px;
}

.quick-card b {
  font-size: 14px;
  font-weight: 600;
}

.quick-card small {
  font-size: 10.5px;
  color: var(--muted);
}

.quick-arrow {
  position: absolute;
  top: 14px;
  right: 12px;
  color: #C3CEDF;
}

.quick-arrow .ic {
  width: 15px;
  height: 15px;
}

.home-foot {
  padding: 18px 18px 0;
  font-size: 10px;
  text-align: center;
  color: #9AA7BC;
}

/* ---------- 8. 任务列表 ---------- */
.tabs-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  margin-top: 4px;
  padding: 8px 18px 10px;
  background: linear-gradient(180deg, var(--bg) 72%, rgba(244, 247, 252, 0));
}

.seg-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: #E9F0F9;
  border-radius: 14px;
}

.seg-tab {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 2px;
  color: #73849F;
  font-size: 11.5px;
  font-weight: 500;
  border-radius: 11px;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}

.seg-tab:active {
  opacity: .75;
}

.seg-tab.is-active {
  color: var(--blue);
  font-weight: 600;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 27, 51, .08);
}

.seg-count {
  min-width: 15px;
  padding: 1px 4px;
  color: #7C8DAB;
  font-size: 9.5px;
  line-height: 1.5;
  text-align: center;
  background: #DCE7F8;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

.seg-tab.is-active .seg-count {
  color: var(--blue);
  background: #E4EEFF;
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding: 0 18px;
}

.task-card {
  position: relative;
  display: flex;
  width: 100%;
  overflow: hidden;
  text-align: left;
  background: var(--card);
  border-radius: var(--r-card);
  box-shadow: var(--shadow);
  transition: transform .12s ease, box-shadow .2s ease;
}

.task-card:active {
  transform: scale(.985);
  box-shadow: 0 2px 10px rgba(15, 27, 51, .05);
}

.task-card:focus-visible {
  outline: 2px solid rgba(27, 107, 255, .5);
  outline-offset: 2px;
}

.task-stripe {
  align-self: stretch;
  flex: none;
  width: 4px;
}

.task-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 13px 14px 12px 13px;
}

.task-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.task-heading {
  flex: 1;
  min-width: 0;
}

.task-heading h3 {
  display: -webkit-box;
  overflow: hidden;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.42;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.task-meta {
  margin-top: 4px;
  overflow: hidden;
  font-size: 11px;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-commission {
  flex: none;
  padding: 4px 7px;
  color: var(--orange);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  text-align: right;
  background: rgba(255, 122, 26, .09);
  border-radius: 8px;
  font-variant-numeric: tabular-nums;
}

.task-commission small {
  display: block;
  margin-top: 2px;
  color: #B08A6B;
  font-size: 9px;
  font-weight: 400;
}

.task-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  color: var(--muted);
}

.task-type-tag {
  padding: 3px 7px;
  color: var(--type-color, var(--blue));
  font-size: 10px;
  font-weight: 500;
  background: var(--type-bg, rgba(27, 107, 255, .1));
  border-radius: 6px;
}

.task-status-tag {
  padding: 3px 7px;
  color: #C03236;
  font-size: 10px;
  font-weight: 500;
  background: #FDECEC;
  border-radius: 6px;
}

.task-due {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.task-due .ic {
  width: 12px;
  height: 12px;
}

.task-due.warn { color: #C2740B; }
.task-due.overdue { color: var(--red); font-weight: 600; }

.task-target {
  margin-left: auto;
  color: #8A97AD;
  font-variant-numeric: tabular-nums;
}

/* ---------- 9. 任务详情 ---------- */
.page-detail {
  padding-bottom: 0;
  background: var(--bg);
  animation: pageFade .18s ease-out both;
}

.detail-head {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: calc(8px + var(--safe-top)) 12px 8px;
  background: rgba(244, 247, 252, .93);
  border-bottom: 1px solid rgba(15, 27, 51, .05);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.detail-head-title {
  flex: 1;
  font-size: 15.5px;
  font-weight: 600;
}

.status-chip {
  padding: 4px 9px;
  color: #526A93;
  font-size: 10.5px;
  font-weight: 500;
  background: #EAF0F9;
  border-radius: 999px;
}

.status-chip.pending { color: #C25E00; background: #FFF1E4; }
.status-chip.doing { color: #1B6BFF; background: #E8F0FF; }
.status-chip.review { color: #A9770A; background: #FFF7E2; }
.status-chip.done { color: #0B8F55; background: #E7F8F0; }
.status-chip.done::before,
.status-tag.settled::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 4px;
  vertical-align: 1px;
  background: var(--green);
  border-radius: 50%;
}
.status-chip.rejected,
.status-chip.expired { color: #C03236; background: #FDECEC; }

.detail-scroll {
  padding: 0 18px calc(104px + var(--safe-bottom));
}

.commission-hero {
  position: relative;
  margin-top: 14px;
  padding: 18px 18px 16px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(140deg, #0B1739, #153A82);
  border-radius: 20px;
  box-shadow: 0 10px 24px rgba(11, 23, 57, .18);
}

.commission-hero::after {
  content: "";
  position: absolute;
  top: -80px;
  right: -70px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(255, 122, 26, .35), rgba(255, 122, 26, 0) 70%);
  border-radius: 50%;
}

.commission-hero-label {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: rgba(255, 255, 255, .7);
}

.commission-hero-label .ic {
  width: 15px;
  height: 15px;
}

.commission-hero-value {
  position: relative;
  z-index: 1;
  margin-top: 8px;
  color: var(--orange);
  font-size: 36px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.5px;
  font-variant-numeric: tabular-nums;
}

.commission-hero p {
  position: relative;
  z-index: 1;
  margin-top: 6px;
  font-size: 11px;
  color: rgba(255, 255, 255, .55);
}

.alert-box {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  padding: 12px 13px;
  color: #A32A2E;
  font-size: 12px;
  line-height: 1.55;
  background: #FDECEC;
  border: 1px solid #F8D4D4;
  border-radius: 14px;
}

.alert-box .ic {
  width: 16px;
  height: 16px;
  flex: none;
  margin-top: 1px;
}

.detail-card {
  margin-top: 14px;
  padding: 16px;
  background: var(--card);
  border-radius: var(--r-card);
  box-shadow: var(--shadow);
}

.detail-card h2 {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #3C4E6E;
  font-size: 13px;
  font-weight: 600;
}

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

.chip {
  padding: 4px 9px;
  color: var(--type-color, var(--blue));
  font-size: 10.5px;
  font-weight: 500;
  background: var(--type-bg, rgba(27, 107, 255, .1));
  border-radius: 999px;
}

.chip.priority-high {
  color: #C03236;
  background: #FDECEC;
}

.chip.priority-normal,
.chip.priority-low {
  color: #64748B;
  background: #F1F5FC;
}

.detail-title {
  margin-top: 10px;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: .1px;
}

.task-code {
  margin-top: 7px;
  color: #9AA7BC;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.info-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
  color: var(--muted);
}

.info-row .label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.info-row .ic {
  width: 15px;
  height: 15px;
  color: #A9B6CC;
}

.info-row b {
  color: var(--text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.info-row b.overdue { color: var(--red); }
.info-row b.warn { color: #C2740B; }

.customer-top {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 13px;
}

.customer-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 44px;
  height: 44px;
  color: var(--blue);
  font-size: 18px;
  font-weight: 600;
  background: #EAF2FF;
  border-radius: 14px;
}

.customer-name {
  font-size: 15.5px;
  font-weight: 600;
}

.customer-sub {
  margin-top: 3px;
  font-size: 11px;
  color: var(--muted);
}

.level-badge {
  margin-left: auto;
  padding: 3px 7px;
  color: #C26A00;
  font-size: 10px;
  font-weight: 600;
  background: #FFF3E0;
  border-radius: 6px;
}

.customer-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: 12.5px;
}

.customer-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.customer-row .ic {
  width: 15px;
  height: 15px;
  color: #A9B6CC;
}

.customer-row b {
  color: var(--text);
  font-weight: 500;
}

.phone-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  padding: 6px 10px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 600;
  background: #EAF2FF;
  border-radius: 10px;
  font-variant-numeric: tabular-nums;
}

.phone-link:active {
  background: #DCE9FF;
}

.phone-link .ic {
  width: 14px;
  height: 14px;
}

.orders {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.orders h4 {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.order-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  font-size: 12px;
  border-bottom: 1px solid #F2F6FC;
}

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

.order-date {
  flex: none;
  width: 44px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.order-amount {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.order-paid {
  margin-left: auto;
  padding: 2px 7px;
  color: #75859E;
  font-size: 10px;
  background: #F1F5FC;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

.order-paid.paid { color: #0B8F55; background: #E7F8F0; }
.order-paid.partial { color: #B96A0B; background: #FFF4E6; }
.order-paid.unpaid { color: #C03236; background: #FDECEC; }

.order-empty {
  padding: 10px 0;
  color: #9AA7BC;
  font-size: 11.5px;
  text-align: center;
}

.desc-text {
  margin-top: 10px;
  color: #3B4A63;
  font-size: 13px;
  line-height: 1.75;
  white-space: pre-wrap;
}

.timeline {
  display: flex;
  flex-direction: column;
  margin-top: 13px;
}

.timeline li {
  position: relative;
  display: flex;
  gap: 10px;
  padding-bottom: 16px;
}

.timeline li:last-child {
  padding-bottom: 0;
}

.timeline li::before {
  content: "";
  position: absolute;
  top: 13px;
  bottom: 0;
  left: 4px;
  width: 2px;
  background: #E8EEF8;
}

.timeline li:last-child::before {
  display: none;
}

.tl-dot {
  position: relative;
  z-index: 1;
  flex: none;
  width: 10px;
  height: 10px;
  margin-top: 4px;
  background: #fff;
  border: 2px solid #C9D8F0;
  border-radius: 50%;
}

.timeline li:first-child .tl-dot {
  background: var(--blue);
  border-color: var(--blue);
}

.tl-label {
  color: var(--text);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.45;
}

.tl-time {
  margin-top: 3px;
  color: #94A1B7;
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}

.result-note {
  margin-top: 10px;
  padding: 11px 12px;
  color: #3B4A63;
  font-size: 13px;
  line-height: 1.7;
  background: #F7FAFF;
  border-radius: 12px;
  white-space: pre-wrap;
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 11px;
}

.result-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  background: #F7FAFF;
  border-radius: 12px;
}

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

.result-cell b {
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.result-cell b.orange {
  color: var(--orange);
}

.review-line {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.review-line b {
  color: var(--text);
  font-weight: 500;
}

.detail-foot {
  position: fixed;
  bottom: 0;
  left: 50%;
  z-index: 35;
  width: 100%;
  max-width: 440px;
  padding: 10px 18px calc(10px + var(--safe-bottom));
  background: rgba(255, 255, 255, .95);
  border-top: 1px solid rgba(15, 27, 51, .06);
  box-shadow: 0 -8px 24px rgba(15, 27, 51, .06);
  transform: translateX(-50%);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.foot-done {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  color: #0B8F55;
  font-size: 13px;
  font-weight: 600;
  background: #E7F8F0;
  border-radius: var(--r-btn);
}

.foot-done .ic {
  width: 18px;
  height: 18px;
  color: var(--green);
}

.foot-done span {
  color: #0B8F55;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ---------- 10. 佣金页 ---------- */
.note-line {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 9px;
  color: #8B98AE;
  font-size: 10.5px;
}

.note-line .ic {
  width: 13px;
  height: 13px;
}

.month-tabs {
  display: flex;
  gap: 8px;
  padding: 14px 18px 12px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.month-tabs::-webkit-scrollbar {
  display: none;
}

.month-tab {
  flex: none;
  padding: 7px 14px;
  color: #5F7395;
  font-size: 12px;
  font-weight: 500;
  background: #EAF0F9;
  border-radius: 999px;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}

.month-tab.is-active {
  color: #fff;
  background: var(--navy);
  box-shadow: 0 6px 14px rgba(11, 23, 57, .18);
}

.month-tab:disabled {
  opacity: .6;
}

.comm-content {
  transition: opacity .18s ease;
}

.comm-content.is-loading {
  opacity: .45;
  pointer-events: none;
}

.summary-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 10px;
  padding: 0 18px;
}

.sum-card {
  padding: 14px;
  background: var(--card);
  border-radius: var(--r-card);
  box-shadow: var(--shadow);
}

.sum-card span {
  color: var(--muted);
  font-size: 11px;
}

.sum-card b {
  display: block;
  margin-top: 7px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.3px;
  font-variant-numeric: tabular-nums;
}

.sum-card small {
  display: block;
  margin-top: 5px;
  color: #9AA7BC;
  font-size: 9.5px;
}

.sum-card.primary {
  color: #fff;
  background: linear-gradient(140deg, #0B1739, #153A82);
}

.sum-card.primary span { color: rgba(255, 255, 255, .66); }
.sum-card.primary b { color: var(--orange); }
.sum-card.primary small { color: rgba(255, 255, 255, .5); }

.comm-empty {
  margin: 16px 18px 0;
}

.comm-list {
  display: flex;
  flex-direction: column;
  margin: 16px 18px 0;
  overflow: hidden;
  background: var(--card);
  border-radius: var(--r-card);
  box-shadow: var(--shadow);
}

.comm-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 14px;
  text-align: left;
  border-bottom: 1px solid #F1F5FB;
}

.comm-item:last-child {
  border-bottom: 0;
}

.comm-item:active {
  background: #F8FAFE;
}

.comm-main {
  flex: 1;
  min-width: 0;
}

.comm-main h3 {
  overflow: hidden;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comm-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  color: #98A5BA;
  font-size: 10px;
}

.basis {
  padding: 2px 6px;
  color: #6E83A6;
  background: #F1F5FC;
  border-radius: 5px;
}

.comm-right {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}

.comm-amount {
  color: var(--orange);
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.status-tag {
  padding: 2px 7px;
  color: #C25E00;
  font-size: 9px;
  font-weight: 500;
  background: #FFF1E4;
  border-radius: 999px;
}

.status-tag.settled {
  color: #0B8F55;
  background: #E7F8F0;
}

.status-tag.void {
  color: #8A97AD;
  background: #F1F5FC;
}

/* ---------- 11. 排行榜 ---------- */
.podium {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: end;
  gap: 8px;
  margin-top: 8px;
  padding: 20px 18px 0;
}

.podium-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 6px 12px;
  text-align: center;
  background: #fff;
  border-radius: 18px 18px 14px 14px;
  box-shadow: var(--shadow);
}

.podium-item.empty-slot {
  opacity: 0;
  pointer-events: none;
}

.podium-empty {
  grid-column: 1 / -1;
}

.podium-item.first {
  padding-top: 20px;
  padding-bottom: 18px;
  background: linear-gradient(170deg, #FFF8EC, #fff);
  box-shadow: 0 10px 26px rgba(255, 122, 26, .14);
}

.podium-crown {
  position: absolute;
  top: -12px;
  color: #F5A623;
}

.podium-crown .ic {
  width: 22px;
  height: 22px;
}

.podium-rank {
  color: #9AA7BC;
  font-size: 10px;
  font-weight: 600;
}

.podium-item.first .podium-rank {
  color: #C57A00;
}

.podium-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  border-radius: 50%;
  box-shadow: 0 6px 14px rgba(15, 27, 51, .16);
}

.podium-item.first .podium-avatar {
  width: 56px;
  height: 56px;
  font-size: 21px;
}

.podium-name {
  max-width: 100%;
  overflow: hidden;
  font-size: 12.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.podium-region {
  margin-top: -2px;
  color: #9AA7BC;
  font-size: 10px;
}

.podium-amount {
  margin-top: 2px;
  color: var(--orange);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.podium-item.first .podium-amount {
  font-size: 15px;
}

.rank-list {
  margin: 16px 18px 0;
  overflow: hidden;
  background: #fff;
  border-radius: var(--r-card);
  box-shadow: var(--shadow);
}

.rank-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid #F1F5FB;
}

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

.rank-row.is-me {
  background: linear-gradient(90deg, rgba(27, 107, 255, .08), rgba(27, 107, 255, .02));
}

.rank-row.is-me::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 0;
  width: 3px;
  background: var(--blue);
  border-radius: 0 3px 3px 0;
}

.rank-num {
  flex: none;
  width: 22px;
  color: #A6B3C8;
  font-size: 12.5px;
  font-weight: 700;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.rank-num.top-1 { color: #E08A00; }
.rank-num.top-2 { color: #8C9BB3; }
.rank-num.top-3 { color: #C08352; }

.rank-who {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.rank-who b {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 600;
}

.rank-who small {
  font-size: 10px;
  color: #9AA7BC;
}

.me-tag {
  padding: 1px 5px;
  color: #fff;
  font-size: 9px;
  font-style: normal;
  font-weight: 600;
  background: var(--blue);
  border-radius: 4px;
}

.rank-amount {
  color: var(--orange);
  font-size: 13.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.rank-note {
  padding: 16px 18px 0;
  color: #9AA7BC;
  font-size: 10px;
  line-height: 1.6;
  text-align: center;
}

/* ---------- 12. 我的 ---------- */
.me-hero {
  position: relative;
  padding: calc(24px + var(--safe-top)) 20px 26px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(150deg, #0B1739, #123372 65%, #17439B);
  border-radius: 0 0 28px 28px;
}

.me-hero::after {
  content: "";
  position: absolute;
  top: -100px;
  right: -80px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(255, 122, 26, .25), rgba(255, 122, 26, 0) 70%);
  border-radius: 50%;
}

.me-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
}

.me-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 60px;
  height: 60px;
  color: #fff;
  font-size: 23px;
  font-weight: 600;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .18), 0 8px 20px rgba(0, 0, 0, .25);
}

.me-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 21px;
  font-weight: 700;
}

.me-role {
  margin-top: 5px;
  color: rgba(255, 255, 255, .62);
  font-size: 11.5px;
}

.me-company {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 12px;
  padding: 4px 9px;
  color: rgba(255, 255, 255, .78);
  font-size: 10.5px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
}

.me-company .ic {
  width: 12px;
  height: 12px;
}

.me-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 14px 18px 0;
  overflow: hidden;
  background: #fff;
  border-radius: var(--r-card);
  box-shadow: var(--shadow);
}

.me-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 8px;
  text-align: center;
}

.me-stat + .me-stat {
  border-left: 1px solid #F1F5FB;
}

.me-stat b {
  font-size: 17px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.me-stat b.orange {
  color: var(--orange);
}

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

.me-section {
  margin: 20px 18px 0;
}

.me-section h2 {
  margin-bottom: 10px;
  color: #3C4E6E;
  font-size: 13px;
  font-weight: 600;
}

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

.badge-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  color: #43536F;
  font-size: 11.5px;
  background: #fff;
  border: 1px solid #EDF2FA;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(15, 27, 51, .04);
}

.badge-icon {
  font-size: 14px;
  line-height: 1;
}

.badge-empty {
  padding: 16px;
  color: var(--muted);
  font-size: 11.5px;
  text-align: center;
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.menu-list {
  overflow: hidden;
  background: #fff;
  border-radius: var(--r-card);
  box-shadow: var(--shadow);
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 14px;
  text-align: left;
  border-bottom: 1px solid #F1F5FB;
  transition: background .15s ease;
}

.menu-item:last-child {
  border-bottom: 0;
}

.menu-item:active {
  background: #F8FAFE;
}

.menu-ic {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 34px;
  height: 34px;
  color: var(--blue);
  background: #F2F7FF;
  border-radius: 10px;
}

.menu-ic .ic {
  width: 18px;
  height: 18px;
}

.menu-label {
  flex: 1;
  font-size: 13.5px;
  font-weight: 500;
}

.menu-extra {
  color: #A0ACC0;
  font-size: 10.5px;
}

.menu-chevron {
  color: #C3CEDF;
}

.menu-chevron .ic {
  width: 16px;
  height: 16px;
}

.logout-btn {
  display: block;
  width: 100%;
  margin-top: 22px;
  padding: 14px;
  color: var(--red);
  font-size: 13.5px;
  font-weight: 500;
  text-align: center;
  background: transparent;
  border-radius: 12px;
}

.logout-btn:active {
  background: rgba(229, 72, 77, .08);
}

.me-foot {
  padding: 16px 0 4px;
  color: #A6B2C6;
  font-size: 10px;
  text-align: center;
}

/* ---------- 13. 动画 ---------- */
@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes pageFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes sheetUp {
  from { transform: translateY(100%); }
  to { transform: none; }
}

@keyframes dialogIn {
  from {
    opacity: 0;
    transform: scale(.94) translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes shimmer {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

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

/* ---------- 14. 响应式与无障碍 ---------- */
@media (max-width: 479px) {
  .app-shell {
    box-shadow: none;
  }
}

@media (min-width: 600px) {
  body {
    padding: 18px 0;
  }

  .app-shell {
    min-height: calc(100vh - 36px);
    min-height: calc(100dvh - 36px);
    border-radius: 24px;
  }

  .home-hero,
  .me-hero {
    border-radius: 24px 24px 28px 28px;
  }

  .page-login {
    min-height: calc(100vh - 36px);
    min-height: calc(100dvh - 36px);
    border-radius: 24px;
  }

  .tabbar {
    bottom: 18px;
    border-radius: 0 0 24px 24px;
  }

  .detail-foot {
    bottom: 18px;
    border-radius: 0 0 24px 24px;
  }
}

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

/* 任务卡产品行 */
.task-product { margin-top: 2px; color: var(--type-color, #1B6BFF); font-weight: 600; }

/* 客户 × 产品频率 */
.freq-list { list-style: none; margin: 0; padding: 0; }
.freq-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line, #EEF2F9); }
.freq-list li:last-child { border-bottom: 0; }
.freq-list b { display: block; font-size: 13.5px; font-weight: 600; }
.freq-list small { display: block; margin-top: 3px; font-size: 11.5px; color: var(--muted, #8792A6); }
.freq-pill { flex: none; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 999px; }
.freq-pill.churn { color: #DC2626; background: #FEE2E2; }
.freq-pill.warn { color: #D97706; background: #FEF3C7; }
.freq-pill.new { color: #2563EB; background: #DBEAFE; }
.freq-pill.ok { color: #059669; background: #D1FAE5; }

/* 我的场景 */
.me-scene-list { display: flex; flex-direction: column; gap: 8px; }
.me-scene { background: var(--card, #fff); border: 1px solid var(--line, #EEF2F9); border-radius: 12px; padding: 12px 14px; }
.me-scene-top { display: flex; align-items: center; gap: 8px; }
.me-scene-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.me-scene-top b { font-size: 13.5px; flex: 1; }
.me-scene-count { font-size: 11px; color: var(--muted, #8792A6); }
.me-scene-products { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.me-scene-products span { font-size: 11px; color: #475569; background: #F1F5F9; border-radius: 999px; padding: 2px 8px; }
.me-scene-empty { margin: 0; font-size: 12px; color: var(--muted, #8792A6); line-height: 1.7; }
