@import url("./tokens.css");

/* —— 小程序 · 医美 B 端轻奢（设计稿 750，原型 375 等比）—— */
.app-stage {
  min-height: 100vh;
  background: #E8E8E8;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  gap: 40px;
  flex-wrap: wrap;
}

.app-phone {
  /* 与 PC 采购端同主色（tokens.css） */
  --accent: #94D64D;
  --accent-soft: #E9F5E1;
  --accent-mid: #7BC42E;
  --accent-dark: #5FA022;
  --accent-gradient: linear-gradient(135deg, #A8E05C 0%, #7BC42E 100%);
  --app-bg: #F7F8F7;
  --app-card-radius: 16px;
  --app-shadow: 0 6px 20px rgba(95, 160, 34, 0.08);
  --success: #5FA022;
  --shadow-soft: 0 6px 20px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 8px 24px rgba(148, 214, 77, 0.22);

  width: 375px;
  height: 780px;
  background: var(--white);
  border-radius: 36px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  border: 10px solid #1A1A1A;
  font-family: "PingFang SC", "SF Pro Text", "Microsoft YaHei", system-ui, sans-serif;
}

.app-status {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 22px 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  flex-shrink: 0;
  background: var(--white);
}

.app-body {
  flex: 1;
  overflow-y: auto;
  background: var(--app-bg);
  -webkit-overflow-scrolling: touch;
}

.app-tabbar {
  height: 56px;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.98);
  display: flex;
  flex-shrink: 0;
  padding: 4px 0 6px;
  backdrop-filter: blur(8px);
}
.app-tabbar a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 10px;
  color: var(--text-muted);
  transition: color 0.2s ease;
}
.app-tabbar a.active { color: var(--accent-dark); font-weight: 600; }
.app-tabbar a.active svg { stroke: var(--accent-dark); }
.app-tabbar svg {
  width: 22px; height: 22px;
  stroke: currentColor; fill: none; stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round;
}

.app-hint {
  max-width: 280px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.7;
}
.app-hint h3 { color: var(--black); margin-bottom: 8px; font-size: 16px; font-weight: 600; }
.app-hint a { color: var(--accent-dark); }

/* —— 工作台顶栏 —— */
.app-wb-head {
  background: var(--white);
  padding: 4px 16px 16px;
}
.app-wb-head .title {
  font-size: 20px;
  font-weight: 700;
  color: var(--black);
  letter-spacing: 0.02em;
  margin-bottom: 12px;
}
.app-wb-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  background: var(--app-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-muted);
  cursor: pointer;
}
.app-wb-search input {
  flex: 1;
  border: 0;
  background: transparent;
  font-size: 13px;
  color: var(--text);
  outline: none;
  pointer-events: none;
}
.app-wb-search svg { flex-shrink: 0; opacity: 0.55; }

/* —— Banner —— */
.app-wb-banner {
  display: block;
  margin: 12px 16px 0;
  height: 120px;
  border-radius: var(--app-card-radius);
  overflow: hidden;
  position: relative;
  background: var(--accent-dark);
  box-shadow: var(--app-shadow);
}
.app-wb-banner img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.55;
  display: block;
}
.app-wb-banner .overlay {
  position: absolute; inset: 0;
  background: linear-gradient(105deg, rgba(26, 29, 33, 0.72) 0%, rgba(95, 160, 34, 0.45) 70%, transparent 100%);
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
}
.app-wb-banner .overlay strong {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.app-wb-banner .overlay span {
  font-size: 12px;
  opacity: 0.85;
  margin-top: 6px;
}

/* —— 功能入口 3×2 —— */
.app-wb-icons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px 4px;
  padding: 20px 12px 8px;
  margin: 12px 16px 0;
  background: var(--white);
  border-radius: var(--app-card-radius);
  box-shadow: var(--app-shadow);
}
.app-wb-icons a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px 4px 12px;
  border-radius: 12px;
  transition: background 0.2s ease;
}
.app-wb-icons a:active { background: var(--accent-soft); }
.app-wb-icons .ico {
  width: 44px; height: 44px;
  border-radius: 14px;
  background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center;
}
.app-wb-icons .ico svg {
  width: 22px; height: 22px;
  stroke: var(--accent-dark); fill: none; stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round;
}
.app-wb-icons span {
  font-size: 12px;
  color: var(--text);
  font-weight: 500;
}

/* —— 区块标题 —— */
.app-section {
  padding: 20px 16px 0;
}
.app-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}
.app-section-head h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.app-section-head .more {
  font-size: 12px;
  color: var(--text-muted);
}

/* —— 精选货品 2×2 —— */
.app-goods-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.app-goods-card {
  background: var(--white);
  border-radius: var(--app-card-radius);
  overflow: hidden;
  box-shadow: var(--app-shadow);
  position: relative;
  display: flex;
  flex-direction: column;
}
.app-goods-card .badge-group {
  position: absolute;
  top: 8px; left: 8px;
  z-index: 1;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  background: var(--accent-dark);
  padding: 2px 8px;
  border-radius: 6px;
  letter-spacing: 0.02em;
}
.app-goods-card .pic {
  display: block;
  height: 110px;
  background: #EEF2F0;
}
.app-goods-card .pic img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.app-goods-card .body { padding: 10px 10px 12px; flex: 1; display: flex; flex-direction: column; }
.app-goods-card .name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  height: 36px;
  overflow: hidden;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.app-goods-card .tag-row {
  margin-top: 6px;
}
.app-goods-card .cat-tag {
  display: inline-block;
  font-size: 10px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  padding: 2px 6px;
  border-radius: 4px;
}
.app-goods-card .foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 10px;
}
.app-goods-card .price {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-dark);
}
.app-goods-card .price-muted {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}
.app-btn-mini {
  flex-shrink: 0;
  height: 28px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 14px;
  border: none;
  background: var(--accent);
  color: var(--black);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.app-btn-mini.is-outline {
  background: transparent;
  color: var(--accent-dark);
  border: 1px solid var(--accent-mid);
}

/* —— 待办 —— */
.app-todo-list { display: flex; flex-direction: column; gap: 10px; padding-bottom: 24px; }
.app-todo-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--white);
  border-radius: var(--app-card-radius);
  box-shadow: var(--app-shadow);
  text-decoration: none;
  color: inherit;
}
.app-todo-card .title { font-size: 14px; font-weight: 600; color: var(--text); }
.app-todo-card .desc { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.app-soft-tag {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 8px;
}
.app-soft-tag.is-inq { background: var(--accent-soft); color: var(--accent-dark); }
.app-soft-tag.is-pay { background: #F5EFE6; color: #8B6914; }
.app-soft-tag.is-ship { background: #E8EEF5; color: #3A5A7A; }

/* —— 通用页头 / 列表 —— */
.app-page-head {
  background: var(--white);
  padding: 8px 16px 12px;
  border-bottom: 1px solid rgba(95, 160, 34, 0.08);
  flex-shrink: 0;
}
.app-page-head h1 {
  font-size: 18px;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 10px;
}
.app-page-head .search-box,
.app-page-head .app-wb-search {
  margin: 0;
}

.app-list-card {
  margin: 10px 12px;
  background: var(--white);
  border-radius: var(--app-card-radius);
  box-shadow: var(--app-shadow);
  overflow: hidden;
}

.app-cat-nav {
  width: 84px;
  background: var(--app-bg);
  overflow-y: auto;
  flex-shrink: 0;
  font-size: 12px;
}
.app-cat-nav a {
  display: block;
  padding: 14px 8px;
  color: var(--text-secondary);
  text-align: center;
  border-left: 3px solid transparent;
}
.app-cat-nav a.active {
  background: var(--white);
  color: var(--accent-dark);
  font-weight: 600;
  border-left-color: var(--accent);
}

.app-goods-row {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid rgba(95, 160, 34, 0.08);
}
.app-goods-row:last-child { border-bottom: none; }
.app-goods-row img {
  width: 76px; height: 76px;
  border-radius: 12px;
  object-fit: cover;
  background: #EEF2F0;
  flex-shrink: 0;
}

/* —— 我的（弧形头图 + 订单行 + 服务网格）—— */
.app-mine-wrap { padding-bottom: 20px; }
.app-mine-hero {
  position: relative;
  background: linear-gradient(145deg, #A8E05C 0%, #7BC42E 45%, #5FA022 100%);
  padding: 8px 20px 48px;
  color: #fff;
  overflow: hidden;
}
.app-mine-hero::after {
  content: "";
  position: absolute;
  left: -10%; right: -10%; bottom: -28px;
  height: 48px;
  background: var(--app-bg);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}
.app-mine-hero .top-row {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  z-index: 1;
}
.app-mine-avatar {
  width: 58px; height: 58px; border-radius: 50%;
  background: rgba(255,255,255,.18);
  border: 2px solid rgba(255,255,255,.85);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff; font-size: 20px; flex-shrink: 0;
}
.app-mine-hero .meta { flex: 1; min-width: 0; }
.app-mine-hero .name {
  font-size: 20px; font-weight: 700; letter-spacing: 0.02em;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.app-mine-hero .level-pill {
  font-size: 10px; font-weight: 600;
  padding: 2px 8px; border-radius: 999px;
  background: rgba(254, 240, 217, 0.95);
  color: #A67C2D;
}
.app-mine-hero .org {
  font-size: 12px; opacity: 0.82; margin-top: 6px;
  display: flex; align-items: center; gap: 6px;
}
.app-mine-hero .org .ok {
  display: inline-flex; align-items: center;
  padding: 1px 6px; border-radius: 999px;
  background: rgba(255,255,255,.16); font-size: 10px;
}
.app-mine-hero .tools {
  display: flex; gap: 10px; flex-shrink: 0;
}
.app-mine-hero .tool {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,.14);
  display: flex; align-items: center; justify-content: center;
  color: #fff; text-decoration: none;
}
.app-mine-hero .tool svg {
  width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.6;
}
.app-mine-assets {
  display: flex;
  margin-top: 22px;
  position: relative;
  z-index: 1;
}
.app-mine-assets a {
  flex: 1; text-align: center; color: #fff; text-decoration: none;
}
.app-mine-assets .num { font-size: 18px; font-weight: 700; }
.app-mine-assets .lbl { font-size: 11px; opacity: 0.75; margin-top: 4px; }

.app-mine-card {
  margin: 0 12px 12px;
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--app-shadow);
  padding: 14px 12px 16px;
  position: relative;
  z-index: 2;
}
.app-mine-card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 4px 14px;
}
.app-mine-card-head h3 { font-size: 15px; font-weight: 600; color: var(--text); }
.app-mine-card-head .more {
  font-size: 12px; color: #999; text-decoration: none;
  display: inline-flex; align-items: center; gap: 2px;
}

.app-mine-orders {
  display: flex;
}
.app-mine-orders a {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-decoration: none; color: var(--text); position: relative;
  padding: 4px 0;
}
.app-mine-orders .ico {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent-dark);
}
.app-mine-orders .ico svg {
  width: 26px; height: 26px; stroke: currentColor; fill: none; stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round;
}
.app-mine-orders span { font-size: 12px; color: #666; }
.app-mine-orders .badge {
  position: absolute; top: -2px; right: 14px;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 8px; background: #E45454; color: #fff;
  font-size: 10px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid #fff;
}

.app-mine-entry {
  display: flex; gap: 10px; margin: -28px 12px 12px; position: relative; z-index: 2;
}
.app-mine-entry a {
  flex: 1;
  display: flex; align-items: center; gap: 10px;
  padding: 14px 12px;
  background: var(--white);
  border-radius: 14px;
  box-shadow: var(--app-shadow);
  text-decoration: none; color: inherit;
}
.app-mine-entry .ico {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent-dark); flex-shrink: 0;
}
.app-mine-entry .ico svg {
  width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.5;
}
.app-mine-entry strong { display: block; font-size: 13px; font-weight: 600; }
.app-mine-entry em { display: block; font-size: 11px; color: #999; font-style: normal; margin-top: 2px; }

.app-mine-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px 4px;
}
.app-mine-grid a {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-decoration: none; color: var(--text); padding: 4px 0;
}
.app-mine-grid .ico {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent-dark);
}
.app-mine-grid .ico svg {
  width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round;
}
.app-mine-grid span { font-size: 12px; color: #555; }

/* App 内按钮覆盖 */
.app-phone .btn-primary,
.app-phone .btn-accent {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.app-phone .btn-primary:hover,
.app-phone .btn-accent:hover { background: var(--accent-mid); }
.app-phone .btn-outline {
  border-color: rgba(95, 160, 34, 0.35);
  color: var(--accent);
}
.app-phone .price { color: var(--accent); }
.app-phone .price-muted { font-size: 12px; font-weight: 500; color: var(--text-muted); }
.app-phone .tag { background: var(--accent-soft); color: var(--accent); }
.app-phone .status-ok { color: var(--accent); }
.app-phone .switch.on { background: var(--accent); }

/* —— 订单状态头 —— */
.app-od-status {
  padding: 20px 16px 18px;
  background: var(--accent-dark);
  color: #fff;
}
.app-od-status.st-pay { background: #7BC42E; }
.app-od-status.st-ship { background: #5FA022; }
.app-od-status.st-done { background: #4A8A1A; }
.app-od-status .row { display: flex; align-items: center; gap: 12px; }
.app-od-status .st-ico {
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,.12); border: 1.5px solid rgba(255,255,255,.35);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px; flex-shrink: 0;
}
.app-od-status h2 { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.app-od-status .tip { font-size: 12px; opacity: .78; line-height: 1.45; }
.app-od-status .cd {
  margin-top: 12px; display: flex; align-items: center; gap: 4px;
  font-size: 12px; opacity: .9;
}
.app-od-status .cd .t {
  min-width: 22px; height: 22px; padding: 0 4px; border-radius: 4px;
  background: rgba(255,255,255,.15); display: inline-flex;
  align-items: center; justify-content: center; font-weight: 700;
}
.app-od-card {
  margin: 10px 12px 0; background: var(--white);
  border-radius: var(--app-card-radius); padding: 14px;
  box-shadow: var(--app-shadow);
}
.app-od-card h3 { font-size: 14px; font-weight: 700; margin-bottom: 12px; }
.app-od-addr { display: flex; gap: 10px; align-items: flex-start; }
.app-od-addr .ico {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.app-od-addr .name { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.app-od-addr .name em { font-style: normal; font-weight: 400; color: var(--text-secondary); margin-left: 8px; font-size: 12px; }
.app-od-addr .line { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }
.app-od-goods { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid rgba(95,160,34,.08); }
.app-od-goods:last-child { border-bottom: none; padding-bottom: 0; }
.app-od-goods:first-child { padding-top: 0; }
.app-od-goods img {
  width: 64px; height: 64px; border-radius: 12px; object-fit: cover;
  background: #EEF2F0; flex-shrink: 0;
}
.app-od-goods .body { flex: 1; min-width: 0; }
.app-od-goods h4 { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.app-od-goods .spec { font-size: 11px; color: var(--text-muted); }
.app-od-goods .side { text-align: right; flex-shrink: 0; font-size: 13px; font-weight: 600; }
.app-od-fee .row {
  display: flex; justify-content: space-between; padding: 6px 0;
  font-size: 12px; color: var(--text-secondary);
}
.app-od-fee .row.total {
  margin-top: 6px; padding-top: 10px; border-top: 1px solid rgba(95,160,34,.1);
  font-size: 14px; font-weight: 600; color: var(--text);
}
.app-od-info .row {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 8px 0; font-size: 12px; border-bottom: 1px dashed rgba(95,160,34,.1);
}
.app-od-info .row:last-child { border-bottom: none; }
.app-od-info .row span:first-child { color: var(--text-muted); flex-shrink: 0; }
.app-od-foot {
  position: absolute; left: 0; right: 0; bottom: 56px;
  background: rgba(255,255,255,.97); border-top: 1px solid rgba(95,160,34,.1);
  padding: 10px 12px; display: flex; align-items: center; gap: 8px; z-index: 5;
}
.app-od-foot .sum { flex: 1; font-size: 12px; color: var(--text-secondary); }
.app-od-foot .sum .price { font-size: 16px; margin-left: 4px; color: var(--accent); }
.app-pay-hero {
  margin: 12px; padding: 24px 16px; text-align: center;
  background: var(--white); border-radius: var(--app-card-radius); box-shadow: var(--app-shadow);
}
.app-pay-hero .label { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.app-pay-hero .amount { font-size: 32px; font-weight: 700; color: var(--accent); letter-spacing: -0.03em; }
.app-pay-hero .cd {
  margin-top: 12px; display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; color: var(--text-secondary); background: var(--app-bg);
  padding: 6px 12px; border-radius: 999px;
}
.app-pay-hero .cd .t {
  min-width: 20px; height: 20px; border-radius: 4px; background: var(--accent);
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 11px;
}
.app-pay-method {
  display: flex; align-items: center; gap: 10px; padding: 12px;
  border: 1px solid rgba(95,160,34,.18); border-radius: 12px;
  margin-bottom: 8px; cursor: pointer; transition: var(--ease);
  background: var(--white);
}
.app-pay-method.selected { border-color: var(--accent); background: var(--accent-soft); }
.app-pay-method .ico {
  width: 32px; height: 32px; border-radius: 8px; display: flex;
  align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.app-pay-method .ico-wx { background: #E8F8E8; color: #07C160; }
.app-pay-method .ico-ali { background: #E8F4FF; color: #1677FF; }
.app-pay-method .ico-bank { background: var(--app-bg); color: var(--text); }
.app-pay-method .info { flex: 1; }
.app-pay-method .info strong { display: block; font-size: 13px; }
.app-pay-method .info span { font-size: 11px; color: var(--text-muted); }
.app-pay-method .radio {
  width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(95,160,34,.25);
}
.app-pay-method.selected .radio {
  border-color: var(--accent); box-shadow: inset 0 0 0 3px var(--accent);
}

/* 登录等 */
.app-login-hero {
  padding: 48px 28px 32px;
  text-align: center;
  background: var(--white);
}
.app-login-hero .mark {
  width: 56px; height: 56px; margin: 0 auto 16px;
  border-radius: 16px; background: var(--accent);
  box-shadow: var(--app-shadow);
}
.app-login-hero h1 { font-size: 22px; font-weight: 700; color: var(--accent); }
.app-login-hero p { font-size: 13px; color: var(--text-muted); margin-top: 8px; }
