* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f5f6f8;
  color: #222;
}
.page {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: #fff;
  box-shadow: 0 0 20px rgba(0,0,0,0.04);
}
header.top {
  background: linear-gradient(135deg, #ff8c42, #ff5f6d);
  color: #fff;
  padding: 20px 16px 16px;
}
header.top h1 { margin: 0; font-size: 20px; }
header.top p { margin: 6px 0 0; font-size: 13px; opacity: 0.9; }
main { padding: 16px; padding-bottom: 40px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; color: #333; }
.field .hint { font-size: 12px; color: #999; margin-top: 4px; }
select, input[type=text], input[type=number], textarea {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  border: 1px solid #ddd;
  border-radius: 10px;
  background: #fafafa;
  -webkit-appearance: none;
}
textarea { resize: vertical; min-height: 60px; }
.file-input {
  border: 2px dashed #ffb199;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  background: #fff8f6;
  position: relative;
}
.file-input input[type=file] {
  position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer;
}
.file-input .icon { font-size: 28px; }
.file-input .txt { font-size: 14px; color: #ff5f6d; margin-top: 6px; font-weight: 600; }
.preview { margin-top: 10px; }
.preview img { max-width: 100%; border-radius: 10px; }
button.primary {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #ff8c42, #ff5f6d);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  margin-top: 8px;
}
button.primary:disabled { opacity: 0.6; }
button.secondary {
  padding: 8px 14px;
  font-size: 13px;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 8px;
  cursor: pointer;
}
.link-btn {
  background: none; border: none; color: #ff5f6d; font-size: 13px; text-decoration: underline; cursor: pointer; padding: 0;
}
.msg { padding: 12px 14px; border-radius: 10px; font-size: 14px; margin-bottom: 16px; }
.msg.success { background: #e6f7ec; color: #1a8f4c; }
.msg.error { background: #fdeceb; color: #d4433a; }
.hidden { display: none !important; }

/* admin */
nav.tabs { display: flex; border-bottom: 1px solid #eee; overflow-x: auto; }
nav.tabs button {
  flex: 1; padding: 12px 8px; background: none; border: none; font-size: 14px; color: #888; cursor: pointer; white-space: nowrap; border-bottom: 3px solid transparent;
}
nav.tabs button.active { color: #ff5f6d; border-bottom-color: #ff5f6d; font-weight: 700; }
.card {
  border: 1px solid #eee; border-radius: 12px; padding: 12px; margin-bottom: 12px; background: #fff;
}
.card .row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; font-size: 14px; }
.card .row .label { color: #999; }
.card .thumb { width: 100%; max-height: 220px; object-fit: contain; border-radius: 8px; background: #f2f2f2; margin: 8px 0; cursor: zoom-in; }
.card .actions { display: flex; gap: 8px; margin-top: 8px; }
.btn-approve { flex:1; background:#1a8f4c; color:#fff; border:none; padding:10px; border-radius: 8px; font-weight:700; cursor:pointer; }
.btn-reject { flex:1; background:#d4433a; color:#fff; border:none; padding:10px; border-radius: 8px; font-weight:700; cursor:pointer; }
.btn-reset { flex:1; background:#888; color:#fff; border:none; padding:10px; border-radius: 8px; font-weight:700; cursor:pointer; }
.badge { display:inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; }
.badge.pending { background:#fff3cd; color:#856404; }
.badge.approved { background:#e6f7ec; color:#1a8f4c; }
.badge.rejected { background:#fdeceb; color:#d4433a; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
table th, table td { text-align: left; padding: 8px 6px; border-bottom: 1px solid #f0f0f0; }
table th { color: #888; font-weight: 600; font-size: 12px; }
.stat-summary { display:flex; gap: 10px; margin-bottom: 16px; }
.stat-box { flex:1; background:#fff8f6; border-radius: 12px; padding: 12px; text-align:center; }
.stat-box .num { font-size: 20px; font-weight: 800; color: #ff5f6d; }
.stat-box .lbl { font-size: 12px; color: #999; margin-top: 4px; }
.group-block { border: 1px solid #eee; border-radius: 12px; margin-bottom: 12px; overflow: hidden; }
.group-block .gh { padding: 12px; background: #fafafa; display:flex; justify-content: space-between; align-items:center; cursor:pointer; }
.group-block .gh .name { font-weight: 700; }
.group-block .gb { padding: 0 12px 12px; display:none; }
.group-block.open .gb { display:block; }
.roster-list { list-style:none; padding:0; margin: 8px 0 0; }
.roster-list li { display:flex; justify-content: space-between; align-items:center; padding: 8px 0; border-bottom: 1px solid #f2f2f2; font-size: 14px; }
.roster-list li .actions { display:flex; gap:6px; }
.roster-list li .actions button { font-size:12px; padding: 4px 8px; }
.login-box { max-width: 320px; margin: 80px auto; padding: 24px; text-align:center; }
