/* 丫丫网购·晒单战报 v20260815a */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f2f3f5; color: #333; font-size: 14px;
}
.page { max-width: 600px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }

/* 顶栏 */
.topbar {
  background: #e84c4c; color: #fff; padding: 14px 16px 10px;
  position: sticky; top: 0; z-index: 10;
}
.topbar-title { font-size: 17px; font-weight: 600; }
.topbar-sub { font-size: 11px; opacity: 0.85; margin-top: 2px; }

/* 内容 */
.content { flex: 1; padding: 12px 12px 70px; overflow-y: auto; }
.card {
  background: #fff; border-radius: 10px; padding: 14px;
  margin-bottom: 12px;
}
.card-title { font-size: 15px; font-weight: 600; margin-bottom: 10px; }
.card-title-sub { font-size: 11px; color: #999; font-weight: 400; margin-left: 6px; }

.field-label { font-size: 12px; color: #888; margin: 10px 0 6px; }

/* 门店格子 */
.store-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.store-cell {
  padding: 8px 14px; border-radius: 8px; border: 1px solid #ddd;
  font-size: 13px; background: #fafafa; cursor: pointer;
}
.store-cell.active { background: #e84c4c; color: #fff; border-color: #e84c4c; }

/* 员工/档位 行 */
.staff-row, .rule-row { display: flex; flex-wrap: wrap; gap: 8px; }
.staff-cell, .rule-cell {
  padding: 8px 14px; border-radius: 8px; border: 1px solid #ddd;
  font-size: 13px; background: #fafafa; cursor: pointer;
}
.staff-cell.active { background: #3a78e8; color: #fff; border-color: #3a78e8; }
.rule-cell small { color: #e67e22; font-size: 11px; margin-left: 3px; }
.rule-cell.active { background: #3a78e8; color: #fff; border-color: #3a78e8; }
.rule-cell.active small { color: #ffd591; }

/* 照片 */
.photo-btns { display: flex; gap: 10px; }
.photo-btns .photo-box { flex: 1; }
.photo-box {
  border: 1.5px dashed #bbb; border-radius: 10px; padding: 40px 0;
  text-align: center; color: #999; font-size: 13px; cursor: pointer;
  background: #fafafa;
}
.photo-preview-wrap { position: relative; }
.photo-preview { width: 100%; border-radius: 10px; display: block; }
.photo-preview-wrap .btn-sm { position: absolute; right: 8px; bottom: 8px; }

.note-input {
  width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 8px;
  font-size: 13px; background: #fafafa; margin-bottom: 4px;
}

/* 按钮 */
.btn {
  display: block; border: none; border-radius: 8px; padding: 11px 0;
  font-size: 15px; text-align: center; cursor: pointer; background: #eee; color: #333;
}
.btn-primary { background: #e84c4c; color: #fff; }
.btn-ghost { background: #fff; border: 1px solid #ccc; color: #666; }
.btn-block { width: 100%; margin-top: 10px; }
.btn-sm { display: inline-block; padding: 6px 12px; font-size: 12px; border-radius: 6px; }
.post-hint { font-size: 12px; color: #999; text-align: center; margin-top: 8px; min-height: 16px; }

/* 榜单 */
.rank-list { display: flex; flex-direction: column; gap: 8px; }
.rank-row {
  display: flex; align-items: center; gap: 10px; background: #f8f8f8;
  border-radius: 8px; padding: 9px 12px; cursor: pointer;
  transition: background 0.15s;
}
.rank-row:active { background: #ececec; }
.rank-no { width: 22px; height: 22px; border-radius: 50%; background: #ddd; color: #666; font-size: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.rank-row:nth-child(1) .rank-no { background: #ffd04b; color: #8a6d00; }
.rank-row:nth-child(2) .rank-no { background: #cfd4da; color: #555; }
.rank-row:nth-child(3) .rank-no { background: #e8b48c; color: #7a4a1d; }
.rank-name { flex: 1; font-size: 14px; }
.rank-name small { color: #999; font-size: 11px; margin-left: 4px; }
.rank-pts { font-weight: 700; color: #e84c4c; font-size: 15px; }
.rank-pts small { font-size: 10px; color: #999; font-weight: 400; }

/* 弹窗 */
.modal-mask {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.5); z-index: 9999;
  display: flex; align-items: center; justify-content: center;
}
.modal-box {
  background: #fff; border-radius: 14px; width: 92%; max-width: 400px;
  max-height: 80vh; display: flex; flex-direction: column; overflow: hidden;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid #f0f0f0;
}
.modal-title { font-size: 15px; font-weight: 700; color: #333; }
.modal-close {
  background: none; border: none; font-size: 24px; color: #999;
  cursor: pointer; padding: 0 4px; line-height: 1;
}
.modal-body { overflow-y: auto; padding: 8px 0; flex: 1; }
.modal-empty { text-align: center; color: #999; font-size: 13px; padding: 30px; }

/* 战报墙列表 */
.wall-list { max-height: 70vh; overflow-y: auto; }
.wall-item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f0f0f0; }
.wall-item:last-child { border-bottom: none; }
.wall-photo { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: #eee; }
.wall-info { flex: 1; min-width: 0; }
.wall-line1 { font-size: 13px; }
.wall-line1 b { font-weight: 600; }
.wall-line1 .pts { color: #e84c4c; font-weight: 700; float: right; }
.wall-note { font-size: 12px; color: #666; margin-top: 3px; word-break: break-all; }
.wall-time { font-size: 11px; color: #aaa; margin-top: 3px; }
.wall-del { align-self: flex-start; background: none; border: none; color: #e84c4c; font-size: 11px; cursor: pointer; padding: 2px 4px; }

/* 底栏 */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 600px; display: flex; background: #fff;
  border-top: 1px solid #e8e8e8; z-index: 10;
}
.tab-item {
  flex: 1; text-align: center; padding: 6px 0 8px; font-size: 11px; color: #999; cursor: pointer;
}
.tab-icon { display: block; font-size: 18px; line-height: 1.3; }
.tab-item.active { color: #e84c4c; }

/* 弹窗 */
.modal { position: fixed; inset: 0; z-index: 99; display: none; }
.modal.show { display: block; }
.modal-mask { position: absolute; inset: 0; background: rgba(0,0,0,0.6); }
.modal-box {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 88%; max-width: 420px; background: #fff; border-radius: 12px; padding: 14px;
  max-height: 86vh; overflow-y: auto;
}
.modal-title { font-size: 14px; font-weight: 600; text-align: center; margin-bottom: 10px; }
.card-img-wrap { text-align: center; }
.share-card-img { width: 100%; border-radius: 8px; display: block; }
.card-share-hint { font-size: 11px; color: #999; text-align: center; margin: 6px 0; }

/* 管理页 */
.form-row { margin-bottom: 6px; }
.form-row-2 { display: flex; gap: 8px; }
.form-row-2 .note-input { flex: 1; }
.rule-edit-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.rule-edit-row { display: flex; gap: 8px; align-items: center; }
.rule-edit-row input[type="text"] { flex: 1; }
.rule-edit-row input[type="number"] { width: 70px; }
.rule-edit-row .btn-del { background: none; border: none; color: #e84c4c; font-size: 16px; padding: 4px 8px; }
.staff-manage-list { margin-top: 10px; max-height: 40vh; overflow-y: auto; }
.staff-manage-row { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; border-bottom: 1px solid #f0f0f0; font-size: 13px; }
.staff-manage-row .btn-del { background: none; border: none; color: #e84c4c; font-size: 12px; cursor: pointer; }
.daily-text { width: 100%; height: 180px; border: 1px solid #ddd; border-radius: 8px; padding: 10px; font-size: 12px; background: #fafafa; resize: none; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%) translateY(20px);
  background: rgba(0,0,0,0.75); color: #fff; font-size: 13px; padding: 9px 18px;
  border-radius: 20px; opacity: 0; pointer-events: none; transition: all 0.25s; z-index: 100;
  max-width: 80%; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
