* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  background: #f6f6f6;
  color: #333;
  font-size: 14px;
  line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
}
.boot { padding: 40px; text-align: center; color: #999; }

#app { max-width: 480px; margin: 0 auto; min-height: 100vh; background: #f6f6f6; position: relative; }

.page { padding: 16px; padding-bottom: 80px; }
.page-header {
  font-size: 22px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 12px 0 20px;
  text-align: center;
}
.sub-header {
  display: grid;
  grid-template-columns: 60px 1fr 60px;
  align-items: center;
  padding: 8px 0;
  margin-bottom: 16px;
  position: sticky;
  top: 0;
  background: #f6f6f6;
  z-index: 10;
}
.sub-header .back-btn {
  color: #07c160;
  font-size: 14px;
  cursor: pointer;
  padding: 6px 0;
}
.sub-header .title {
  font-size: 17px;
  font-weight: 600;
  text-align: center;
  color: #1a1a1a;
}

.card {
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.card-label {
  font-size: 13px;
  color: #888;
  margin-bottom: 8px;
}
.card-label .req { color: #ee0a24; margin-left: 4px; }
.hint {
  font-size: 12px;
  color: #fa8c16;
  margin: -2px 0 10px;
  line-height: 1.4;
}

input[type=text], input[type=password], input[type=tel], input[type=number], select, textarea {
  width: 100%;
  border: none;
  outline: none;
  font-size: 15px;
  padding: 8px 0;
  background: transparent;
  border-bottom: 1px solid #eee;
  color: #333;
  font-family: inherit;
}
input:focus { border-bottom-color: #07c160; }
input::placeholder { color: #bbb; }

.btn {
  display: block;
  width: 100%;
  background: #07c160;
  color: #fff;
  border: none;
  border-radius: 24px;
  padding: 13px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  margin-top: 24px;
  font-family: inherit;
}
.btn:active { background: #06ad56; }
.btn:disabled { background: #9ad8b8; }
.btn-secondary {
  background: #fff;
  color: #07c160;
  border: 1px solid #07c160;
}
.btn-secondary:active { background: #f0fbf5; }

.link {
  display: block;
  text-align: center;
  color: #07c160;
  font-size: 13px;
  margin-top: 16px;
  padding: 8px;
  cursor: pointer;
  text-decoration: none;
}

.avatar-wrap {
  width: 80px;
  height: 80px;
  border-radius: 40px;
  background: #eee;
  overflow: hidden;
  margin: 0 auto 12px;
}
.avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 40px;
  background: #f0f0f0;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aaa;
  font-size: 12px;
  cursor: pointer;
}

.img-cell {
  width: 100%;
  aspect-ratio: 16/9;
  border: 1px dashed #ccc;
  border-radius: 8px;
  background: #fafafa;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 13px;
  cursor: pointer;
  overflow: hidden;
  position: relative;
}
.img-cell img { width: 100%; height: 100%; object-fit: cover; }

/* 多图上传网格 */
.img-multi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.img-multi-cell {
  position: relative;
  aspect-ratio: 1;
  border-radius: 6px;
  overflow: hidden;
  background: #f0f0f0;
}
.img-multi-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  display: block;
}
.img-multi-cell .img-del {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  user-select: none;
}
.img-multi-add {
  aspect-ratio: 1;
  border: 1px dashed #ccc;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #999;
  cursor: pointer;
  background: #fafafa;
}
.img-multi-add:active { background: #f0f0f0; }

/* 固定槽位多图（带标签） */
.img-labeled-grid {
  display: grid;
  gap: 10px;
}
.img-labeled-grid.two { grid-template-columns: repeat(2, 1fr); }
.img-labeled-grid.three { grid-template-columns: repeat(3, 1fr); }
.img-labeled-cell {
  display: flex;
  flex-direction: column;
}
.img-labeled-label {
  font-size: 11px;
  color: #666;
  margin-bottom: 6px;
  line-height: 1.4;
  min-height: 30px;
}
.img-labeled-drop {
  aspect-ratio: 3/4;
  border: 1px dashed #ccc;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #999;
  cursor: pointer;
  background: #fafafa;
  position: relative;
  overflow: hidden;
}
.img-labeled-drop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.img-labeled-drop.has-img {
  border-style: solid;
  border-color: #eee;
  background: #fff;
}
.img-labeled-drop .img-del {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  user-select: none;
}

.list-item {
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}
.list-item:last-child { border-bottom: none; }
.list-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.list-title { font-size: 14px; color: #333; }
.list-meta { font-size: 12px; color: #999; margin-top: 4px; }
.list-points { font-size: 14px; font-weight: 600; }
.list-points.plus { color: #07c160; }
.list-points.minus { color: #ee0a24; }

.tag {
  display: inline-block;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
}
.tag-pending { background: #fff7e6; color: #fa8c16; }
.tag-approved { background: #e6ffed; color: #07c160; }
.tag-rejected { background: #fff1f0; color: #ee0a24; }

.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.75);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 9999;
  pointer-events: none;
  max-width: 80%;
  text-align: center;
}

.balance {
  text-align: center;
  padding: 20px 0;
}
.balance-num {
  font-size: 36px;
  font-weight: 600;
  color: #07c160;
}
.balance-label { font-size: 13px; color: #888; margin-top: 4px; }

.empty {
  text-align: center;
  color: #bbb;
  font-size: 13px;
  padding: 40px 0;
}

.menu-item {
  display: flex;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
}
.menu-item:last-child { border-bottom: none; }
.menu-item .menu-label { flex: 1; }
.menu-item .menu-arrow { color: #ccc; }

.user-card {
  display: flex;
  align-items: center;
  padding: 16px;
}

/* 首页快捷入口 */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  background: #fff;
  border-radius: 10px;
  padding: 16px 8px;
  margin-bottom: 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.quick-cell {
  text-align: center;
  cursor: pointer;
  padding: 8px 4px;
  border-radius: 8px;
  transition: background 0.15s;
}
.quick-cell:active { background: #f5f5f5; }
.quick-icon {
  font-size: 28px;
  margin-bottom: 6px;
}
.quick-label {
  font-size: 12px;
  color: #555;
}

/* 底部 tab bar */
.tab-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-top: 1px solid #eee;
  display: flex;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
}
.tab-bar-item {
  flex: 1;
  text-align: center;
  padding: 8px 0 10px;
  color: #888;
  font-size: 11px;
  cursor: pointer;
  text-decoration: none;
}
.tab-bar-item.active { color: #07c160; }
.tab-bar-item .icon {
  font-size: 22px;
  display: block;
  margin-bottom: 2px;
}
