/* 前台公共组件 v2 —— 列表、表单、弹层、按钮 */

/* 页面容器（无底栏页用） */
.page { padding-bottom: 24px; }
.pb-bar { padding-bottom: 134px; }

/* 分组标题 */
.gtitle {
  padding: 18px 16px 8px; font-size: 13px; color: #9aa0a8;
  display: flex; align-items: center; justify-content: space-between;
}
.gtitle b { color: #1a1a1a; font-size: 15px; font-weight: 700; }
.gtitle a { color: #ee5a8a; font-size: 12.5px; }

/* 列表组 */
.list { background: #fff; border-radius: 14px; margin: 0 12px; overflow: hidden; }
.cell {
  display: flex; align-items: center; gap: 11px;
  padding: 14px; border-bottom: 1px solid #f6f7f8;
  font-size: 14px; color: #1a1a1a; position: relative;
}
.cell:last-child { border-bottom: none; }
.cell:active { background: #fcfcfd; }
.cell .ic {
  width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: #fdf0f5; color: #ee5a8a;
}
.cell .ic svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.7; }
.cell .ic.b { background: #eef4ff; color: #4a86e8; }
.cell .ic.g { background: #edf9f1; color: #35a35b; }
.cell .ic.o { background: #fff5e8; color: #e09a2e; }
.cell .ic.v { background: #f3efff; color: #7c5cf0; }
.cell .t { flex: 1; min-width: 0; }
.cell .t b { font-weight: 500; font-size: 14px; display: block; }
.cell .t em {
  font-style: normal; display: block; font-size: 11.5px;
  color: #9aa0a8; margin-top: 2px;
}
.cell .v { font-size: 13px; color: #9aa0a8; }
.cell .v.on { color: #ee5a8a; }
.cell .arrow { color: #cfd3d9; flex-shrink: 0; }
.cell .arrow svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; }

/* 分段/筛选项 */
.seg {
  display: flex; gap: 8px; padding: 12px; overflow-x: auto;
  scrollbar-width: none;
}
.seg::-webkit-scrollbar { display: none; }
.seg a {
  padding: 6px 14px; border-radius: 16px; background: #f4f5f7;
  font-size: 13px; color: #5c6169; white-space: nowrap; flex-shrink: 0;
}
.seg a.on {
  background: linear-gradient(135deg, #ff7ba9, #e04379); color: #fff;
  font-weight: 600; box-shadow: 0 3px 10px rgba(238,90,138,.28);
}

/* 顶部筛选条 */
.filterbar {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  background: #fff; border-bottom: 1px solid #f6f7f8; overflow-x: auto;
  position: sticky; top: 50px; z-index: 50; scrollbar-width: none;
}
.filterbar::-webkit-scrollbar { display: none; }
.filterbar .f {
  padding: 5px 12px; border-radius: 14px; background: #f4f5f7;
  font-size: 12.5px; color: #5c6169; white-space: nowrap;
  display: flex; align-items: center; gap: 4px; flex-shrink: 0;
}
.filterbar .f.on { background: #fdeef4; color: #e04379; font-weight: 600; }
.filterbar .f i { font-style: normal; font-size: 9px; opacity: .7; }

/* 表单 */
.form { background: #fff; border-radius: 14px; margin: 0 12px; overflow: hidden; }
.fr {
  display: flex; align-items: center; gap: 10px;
  padding: 14px; border-bottom: 1px solid #f6f7f8; min-height: 52px;
}
.fr:last-child { border-bottom: none; }
.fr > label { width: 88px; flex-shrink: 0; font-size: 14px; color: #5c6169; }
.fr > label em { color: #ee5a8a; font-style: normal; margin-left: 1px; }
.fr input, .fr select, .fr textarea {
  flex: 1; min-width: 0; border: none; outline: none; background: transparent;
  font-size: 14px; color: #1a1a1a; font-family: inherit;
}
.fr input::placeholder, .fr textarea::placeholder { color: #c2c7ce; }
.fr textarea { height: 66px; resize: none; line-height: 1.6; }
.fr.col { display: block; }
.fr.col > label { display: block; margin-bottom: 8px; }
.fr .unit { font-size: 13px; color: #9aa0a8; }
.fr .pick {
  flex: 1; display: flex; align-items: center; justify-content: space-between;
  font-size: 14px; color: #1a1a1a;
}
.fr .pick.ph { color: #c2c7ce; }

/* 单选胶囊组 */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips a {
  padding: 6px 14px; border-radius: 15px; background: #f4f5f7;
  font-size: 13px; color: #5c6169;
}
.chips a.on { background: #fdeef4; color: #e04379; font-weight: 600; border: 1px solid #fbd0e0; }

/* 按钮 */
.btn2 {
  height: 44px; border-radius: 22px; display: flex; align-items: center;
  justify-content: center; font-size: 15px; font-weight: 600; width: 100%;
}
.btn2.p {
  background: linear-gradient(135deg, #ff7ba9, #e04379); color: #fff;
  box-shadow: 0 6px 16px rgba(238,90,138,.3);
}
.btn2.g { background: #fff; border: 1px solid #fbe0ea; color: #ee5a8a; }
.btn2.dis { background: #ecedf0; color: #b4b9c1; box-shadow: none; }
.btn2.sm { height: 34px; border-radius: 17px; font-size: 13.5px; width: auto; padding: 0 18px; }

/* 底部固定操作条 */
.fixedbar {
  position: fixed; bottom: 56px; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 430px; background: #fff; z-index: 80;
  border-top: 1px solid #f2f3f5;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  display: flex; gap: 10px;
}

/* 底部弹层 */
.sheet-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 200;
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; transition: opacity .2s;
}
.sheet-mask.in { opacity: 1; }
.sheet {
  width: 100%; max-width: 430px; background: #fff;
  border-radius: 18px 18px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
  transform: translateY(24px); transition: transform .22s;
  max-height: 82vh; overflow-y: auto;
}
.sheet-mask.in .sheet { transform: none; }
.sheet h3 { font-size: 16px; font-weight: 700; text-align: center; margin-bottom: 16px; }
.sheet .sh-sub { font-size: 12.5px; color: #9aa0a8; text-align: center; margin: -10px 0 14px; }

/* Toast */
.toast {
  position: fixed; left: 50%; top: 46%; transform: translate(-50%, -50%) scale(.94);
  background: rgba(20,20,24,.82); color: #fff; padding: 11px 20px;
  border-radius: 10px; font-size: 13.5px; z-index: 400; opacity: 0;
  transition: .2s; pointer-events: none; max-width: 76%; text-align: center;
  line-height: 1.5;
}
.toast.in { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* 空态 */
.empty {
  padding: 70px 20px; text-align: center; color: #b4b9c1; font-size: 13.5px;
}
.empty svg { width: 54px; height: 54px; margin: 0 auto 14px; display: block; opacity: .5; }

/* 小标签 */
.pill {
  display: inline-flex; align-items: center; height: 20px; padding: 0 7px;
  border-radius: 4px; font-size: 11.5px; white-space: nowrap;
}
.pill.pink { background: #fdeef4; color: #e04379; }
.pill.blue { background: #e9f5fe; color: #3fa9f5; }
.pill.gray { background: #f3f4f6; color: #8a8f99; }
.pill.green { background: #edf9f1; color: #35a35b; }
.pill.gold { background: #fff6e5; color: #d99a1f; }

/* 数字/金额 */
.num { font-variant-numeric: tabular-nums; }
.pink-t { color: #ee5a8a; }
.gray-t { color: #9aa0a8; }

/* 顶部渐变头 */
.ghead {
  background: linear-gradient(160deg, #ff9dbd 0%, #ee5a8a 60%, #e04379 100%);
  padding: 18px 16px 20px; color: #fff; position: relative;
  border-radius: 0 0 20px 20px;
}
.ghead h2 { font-size: 19px; font-weight: 800; letter-spacing: -.2px; }
.ghead p { font-size: 12.5px; opacity: .88; margin-top: 5px; line-height: 1.6; }

/* 两列/三列网格 */
.g3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.g4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.gtile {
  background: #fff; border-radius: 12px; padding: 13px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-size: 12px; color: #5c6169;
}
.gtile svg { width: 22px; height: 22px; stroke: #ee5a8a; fill: none; stroke-width: 1.7; }

/* 开关 */
.sw { position: relative; display: inline-block; width: 44px; height: 25px; flex: 0 0 auto; }
.sw input { position: absolute; opacity: 0; width: 0; height: 0; }
.sw .tr {
  position: absolute; left: 0; top: 0; width: 44px; height: 25px;
  background: #e3e6ea; border-radius: 13px; transition: .18s; display: block; margin: 0;
}
.sw .tr::after {
  content: ""; position: absolute; left: 2px; top: 2px; width: 21px; height: 21px;
  background: #fff; border-radius: 50%; transition: .18s; box-shadow: 0 1px 3px rgba(0,0,0,.18);
}
.sw input:checked + .tr { background: linear-gradient(135deg, #ff7ba9, #e04379); }
.sw input:checked + .tr::after { transform: translateX(19px); }
