/* 周周运动品牌色：墨黑 + 浅豆绿 + 宣纸白，与 App 图标一致 */
:root {
  --orange: #1f2a24;
  --orange-soft: #eef6ea;
  --teal: #6aad66;
  --teal-soft: #eaf5e6;
  --ink: #1b1b1b;
  --ink-2: #5b6b60;
  --line: #e3ebe0;
  --bg: #f8f8f4;
  --card: #ffffff;
  --danger: #c0493b;
  --ok: #3e8e5a;
  --radius: 16px;
  --shadow: 0 3px 14px rgba(31, 55, 76, .07);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 15px; line-height: 1.6;
}
.app { max-width: 560px; margin: 0 auto; min-height: 100vh; padding-bottom: 84px; }
.boot { padding: 60px 20px; text-align: center; color: var(--ink-2); }

/* 顶部 */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: linear-gradient(135deg, #1f2a24, #4e7c55);
  color: #fff; padding: 18px 18px 16px;
  border-radius: 0 0 22px 22px; box-shadow: var(--shadow);
}
.topbar h1 { margin: 0; font-size: 19px; font-weight: 700; letter-spacing: .5px; }
.topbar p { margin: 4px 0 0; font-size: 12px; opacity: .9; }
.role-switch { display: flex; gap: 8px; margin-top: 14px; }
.role-switch button {
  flex: 1; padding: 7px 10px; border-radius: 10px; border: 1px solid rgba(255,255,255,.55);
  background: rgba(255,255,255,.15); color: #fff; font-size: 13px; cursor: pointer;
}
.role-switch button.active { background: #fff; color: var(--orange); font-weight: 700; border-color: #fff; }

/* 内容 */
.page { padding: 16px 16px 24px; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 14px; }
.card h2 { margin: 0 0 10px; font-size: 16px; }
.card h3 { margin: 14px 0 8px; font-size: 14px; color: var(--ink-2); }
.muted { color: var(--ink-2); font-size: 13px; }
.tiny { font-size: 12px; color: var(--ink-2); }
.hero-number { font-size: 34px; font-weight: 800; color: var(--orange); line-height: 1.2; }
.hero-label { font-size: 12px; color: var(--ink-2); }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat-grid > div { background: var(--bg); border-radius: 12px; padding: 10px 8px; text-align: center; }
.stat-grid b { display: block; font-size: 19px; color: var(--teal); }
.stat-grid span { font-size: 11px; color: var(--ink-2); }
.promise {
  background: var(--teal-soft); border-left: 4px solid var(--teal);
  padding: 10px 12px; border-radius: 8px; font-size: 13px; margin-bottom: 14px;
}
.brand { display: flex; align-items: center; gap: 12px; margin: 4px 0 14px; }
.brand-logo { width: 64px; height: 64px; border-radius: 14px; flex: none;
  border: 1px solid var(--line); background: #f7f6f0; object-fit: cover; }
.brand span { font-size: 13px; color: var(--ink-2); letter-spacing: .5px; }
.warn { background: #fff6e8; border-left: 4px solid #f0a92b; padding: 10px 12px; border-radius: 8px; font-size: 13px; margin-bottom: 14px; }

/* 表单 */
label.field { display: block; margin-bottom: 12px; }
label.field > span:not(.pwd-wrap) { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 5px; }
/* 密码框：右侧眼睛按钮 + 即时一致性提示 */
.pwd-wrap { position: relative; display: block; }
.pwd-wrap input { padding-right: 46px; }
.pwd-eye {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  border: none; background: transparent; color: var(--ink-2); cursor: pointer;
  border-radius: 9px; padding: 0; font-family: inherit;
}
.pwd-eye:hover { background: var(--bg); color: var(--orange); }
.pwd-eye[data-on="1"] { color: var(--orange); }
.pwd-hint { margin: 5px 0 0; font-size: 12px; line-height: 1.4; }
.pwd-hint:empty { display: none; }
.pwd-hint.ok { color: var(--ok); }
.pwd-hint.bad { color: var(--danger); }
input, select, textarea {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; color: var(--ink); font-size: 15px; font-family: inherit; outline: none;
}
input:focus, select:focus { border-color: var(--orange); }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; min-width: 0; }
button.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 16px; border: none; border-radius: 11px; background: var(--orange);
  color: #fff; font-size: 15px; font-weight: 600; cursor: pointer; font-family: inherit;
}
button.btn:active { transform: translateY(1px); }
button.btn.block { width: 100%; }
button.btn.ghost { background: #fff; color: var(--orange); border: 1px solid var(--orange); }
button.btn.gray { background: #eef2f5; color: var(--ink-2); }
button.btn.teal { background: var(--teal); }
button.btn:disabled { opacity: .5; cursor: not-allowed; }
button.mini { padding: 6px 12px; font-size: 13px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; }
.checkline { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; margin: 10px 0; }
.checkline input { width: 18px; height: 18px; flex: 0 0 18px; margin-top: 2px; }

/* 列表 */
.list { display: flex; flex-direction: column; gap: 10px; }
.list-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px; background: var(--bg); border-radius: 12px;
}
.list-item .main { min-width: 0; flex: 1; }
.list-item .main b { display: block; font-size: 14px; }
.list-item .main small { display: block; color: var(--ink-2); font-size: 12px; word-break: break-all; }
.tag { font-size: 11px; padding: 3px 8px; border-radius: 20px; background: var(--teal-soft); color: var(--teal); white-space: nowrap; }
.tag.warn-tag { background: #fff0e4; color: #c2611f; }
.tag.gray-tag { background: #eef2f5; color: var(--ink-2); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 7px 12px; border-radius: 20px; border: 1px solid var(--line); background: #fff; font-size: 13px; cursor: pointer; }
.chip.active { background: var(--orange); color: #fff; border-color: var(--orange); }
.divider { height: 1px; background: var(--line); margin: 14px 0; }
.kv { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; padding: 5px 0; }
.kv span { color: var(--ink-2); }

/* 底部导航 */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
  max-width: 560px; margin: 0 auto; display: flex;
  background: #fff; border-top: 1px solid var(--line);
  padding: 7px 4px calc(7px + env(safe-area-inset-bottom));
}
.tabbar button {
  flex: 1; border: none; background: transparent; color: var(--ink-2);
  font-size: 11px; display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer;
  font-family: inherit; padding: 4px 0;
}
.tabbar button .ic { font-size: 19px; line-height: 1.2; }
.tabbar button.active { color: var(--orange); font-weight: 700; }

/* 提示 */
.toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%) translateY(20px);
  background: rgba(34,48,60,.94); color: #fff; padding: 10px 16px; border-radius: 10px;
  font-size: 13px; max-width: 86%; opacity: 0; pointer-events: none; transition: .22s; z-index: 99;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.err { color: var(--danger); font-size: 13px; margin: 8px 0; }
.ok-text { color: var(--ok); font-size: 13px; margin: 8px 0; }
.badge-501 { display: inline-block; background: #eef2f5; color: var(--ink-2); font-size: 11px; padding: 2px 7px; border-radius: 6px; }
