/* app.wxss — 搭子平台小程序原型自定义样式 */
/* WeUI via CDN: https://res.wx.qq.com/open/libs/weui/2.6.0/weui.min.css */

* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: #1a1a2e; font-family: -apple-system, 'PingFang SC', sans-serif; display: flex; min-height: 100vh; }
.layout { display: flex; gap: 20px; padding: 20px 20px 20px 215px; align-items: flex-start; width: 100%; }
.phone-wrap { flex-shrink: 0; }
.phone { width: 375px; height: 812px; background: #f5f5f5; border-radius: 44px; overflow: hidden; position: relative; box-shadow: 0 30px 80px rgba(0,0,0,0.5), inset 0 0 0 2px #333; }
.phone::before { content:''; position:absolute; top:0; left:50%; transform:translateX(-50%); width:150px; height:30px; background:#111; border-radius:0 0 20px 20px; z-index:999; }
.screen { position:absolute; top:0; left:0; width:100%; height:100%; display:none; flex-direction:column; background:#f5f5f5; overflow:hidden; }
.screen.active { display:flex; }
.status-bar { height:44px; display:flex; align-items:flex-end; padding:0 20px 6px; justify-content:space-between; font-size:12px; font-weight:600; flex-shrink:0; }
.status-bar.light { color:#fff; } .status-bar.dark { color:#000; }
.status-icons { display:flex; gap:5px; align-items:center; font-size:11px; }
.nav-bar { height:44px; display:flex; align-items:center; padding:0 16px; position:relative; background:#fff; flex-shrink:0; border-bottom:1px solid #f0f0f0; }
.nav-back { font-size:22px; color:#333; cursor:pointer; padding:4px 8px 4px 0; line-height:1; }
.nav-title { position:absolute; left:50%; transform:translateX(-50%); font-size:17px; font-weight:600; color:#1a1a1a; white-space:nowrap; max-width:calc(100% - 200px); overflow:hidden; text-overflow:ellipsis; }
.nav-right { margin-left:auto; font-size:14px; color:#07c160; cursor:pointer; }
.tab-bar { height:56px; background:#fff; border-top:1px solid #e8e8e8; display:flex; align-items:center; flex-shrink:0; padding-bottom:4px; }
.tab-item { display:flex; flex-direction:column; align-items:center; gap:2px; cursor:pointer; flex:1; padding:4px 0; }
.tab-icon { font-size:22px; }
.tab-label { font-size:10px; color:#999; }
.tab-item.active .tab-label { color:#07c160; }
#global-tab-bar { position:absolute; bottom:0; left:0; width:100%; z-index:200; height:56px; background:#fff; border-top:1px solid #e8e8e8; display:none; align-items:center; padding-bottom:4px; }
.has-tabbar .scroll { padding-bottom:60px; }
.scroll { flex:1; overflow-y:auto; overflow-x:hidden; }
.btn { border:none; border-radius:8px; padding:13px; font-size:16px; font-weight:600; cursor:pointer; width:100%; }
.btn-primary { background:#07c160; color:#fff; }
.btn-secondary { background:#f0f0f0; color:#555; font-size:15px; font-weight:500; }
.btn-danger { background:#ff4d4f; color:#fff; }
.btn-ghost { background:transparent; color:#07c160; border:1px solid #07c160; border-radius:8px; padding:11px; font-size:14px; cursor:pointer; }
.btn-ghost-red { background:transparent; color:#ff4d4f; border:1px solid #ff4d4f; border-radius:8px; padding:11px; font-size:14px; cursor:pointer; }
.card { background:#fff; border-radius:12px; margin:8px 16px; overflow:hidden; }
.form-group { background:#fff; border-radius:12px; margin:8px 16px; overflow:hidden; }
.form-item { display:flex; align-items:center; padding:13px 16px; border-bottom:1px solid #f5f5f5; min-height:50px; }
.form-item:last-child { border-bottom:none; }
.form-label { font-size:14px; color:#666; width:82px; flex-shrink:0; }
.form-value { flex:1; font-size:15px; color:#1a1a1a; }
.form-input { flex:1; font-size:15px; color:#1a1a1a; border:none; outline:none; background:transparent; }
.form-arrow { color:#ccc; font-size:16px; }
.input-box { background:#fff; border-radius:12px; margin:8px 16px; padding:14px 16px; }
.input-box input, .input-box textarea { width:100%; border:none; outline:none; font-size:15px; color:#1a1a1a; background:transparent; font-family:inherit; resize:none; }
.input-label { font-size:14px; color:#999; margin-bottom:8px; }
.section-header { padding:16px 16px 8px; font-size:13px; color:#999; font-weight:500; }
.section-title { font-size:16px; font-weight:700; color:#1a1a1a; padding:16px 16px 8px; }
.chip { display:inline-flex; align-items:center; padding:5px 12px; border-radius:20px; font-size:13px; cursor:pointer; margin:3px; border:1px solid #e0e0e0; color:#555; background:#fff; }
.chip.active { background:#e8f7ef; border-color:#07c160; color:#07c160; }
.chip.orange { background:#fff7e6; border-color:#fa8c16; color:#fa8c16; }
.badge { display:inline-block; padding:2px 8px; border-radius:10px; font-size:11px; font-weight:600; }
.badge-green { background:#e8f7ef; color:#07c160; }
.badge-orange { background:#fff7e6; color:#fa8c16; }
.badge-red { background:#fff1f0; color:#ff4d4f; }
.badge-grey { background:#f0f0f0; color:#999; }
.badge-purple { background:#f3e8ff; color:#7c3aed; }
.banner { padding:10px 16px; font-size:13px; display:flex; gap:8px; align-items:flex-start; flex-shrink:0; }
.banner-orange { background:#fff7e6; color:#fa8c16; }
.banner-green { background:#f6ffed; color:#52c41a; }
.banner-red { background:#fff1f0; color:#ff4d4f; }
.banner-blue { background:#e6f7ff; color:#1890ff; }
.overlay { position:absolute; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.5); display:none; flex-direction:column; justify-content:flex-end; z-index:300; }
.overlay.show, .overlay.active { display:flex; }
.overlay-sheet { background:#fff; border-radius:20px 20px 0 0; padding:20px 16px; max-height:80%; overflow-y:auto; }
.overlay-handle { width:36px; height:4px; background:#e0e0e0; border-radius:2px; margin:0 auto 16px; }
.overlay-title { font-size:17px; font-weight:700; color:#1a1a1a; margin-bottom:16px; text-align:center; }
.event-card { background:#fff; border-radius:12px; margin:8px 16px; padding:14px; cursor:pointer; }
.event-card-head { display:flex; align-items:center; gap:8px; margin-bottom:10px; }
.event-card-title { font-size:16px; font-weight:700; color:#1a1a1a; margin-bottom:8px; }
.event-card-meta { font-size:13px; color:#666; display:flex; align-items:center; gap:4px; margin-bottom:4px; }
.event-card-foot { display:flex; justify-content:space-between; align-items:center; margin-top:10px; }
.avatar { border-radius:50%; background:#ddd; display:inline-flex; align-items:center; justify-content:center; font-size:18px; overflow:hidden; flex-shrink:0; }
.avatar-sm { width:32px; height:32px; font-size:14px; }
.avatar-md { width:48px; height:48px; font-size:20px; }
.avatar-lg { width:72px; height:72px; font-size:32px; }
.avatar-slot { width:32px; height:32px; border-radius:50%; border:2px dashed #ccc; display:inline-flex; align-items:center; justify-content:center; font-size:14px; color:#ccc; flex-shrink:0; }
.sticky-bottom { padding:12px 16px; background:#fff; border-top:1px solid #f0f0f0; flex-shrink:0; }
.help-btn { display:inline-flex; align-items:center; justify-content:center; width:18px; height:18px; border-radius:50%; border:1.5px solid #bbb; color:#999; font-size:11px; font-weight:700; cursor:pointer; flex-shrink:0; margin-right:8px; user-select:none; }
.help-btn:hover { border-color:#07c160; color:#07c160; }
.sticky-hint { font-size:12px; color:#999; text-align:center; margin-bottom:8px; }
.coin-hint { font-size:12px; color:#fa8c16; text-align:center; margin-bottom:8px; }
.impact-card { border-radius:10px; padding:12px 14px; margin-bottom:12px; }
.impact-warn { background:#fff7e6; border-left:3px solid #fa8c16; }
.impact-danger { background:#fff1f0; border-left:3px solid #ff4d4f; }
.impact-row { font-size:13px; color:#666; line-height:2; }
.info-row { display:flex; justify-content:space-between; align-items:center; padding:10px 16px; border-bottom:1px solid #f5f5f5; font-size:14px; }
.inner-tabs { display:flex; background:#fff; border-bottom:1px solid #f0f0f0; flex-shrink:0; }
.inner-tab { flex:1; text-align:center; padding:12px 0; font-size:14px; color:#999; cursor:pointer; border-bottom:2px solid transparent; }
.inner-tab.active { color:#07c160; border-bottom-color:#07c160; font-weight:600; }
.filter-bar { display:flex; gap:6px; padding:10px 16px; overflow-x:auto; flex-shrink:0; background:#fff; }
.filter-bar::-webkit-scrollbar { display:none; }
.search-bar { display:flex; align-items:center; background:#f5f5f5; border-radius:20px; padding:8px 14px; gap:8px; margin:8px 16px; }
.search-bar input { border:none; outline:none; background:transparent; font-size:14px; flex:1; }
.success-page { flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; padding:40px 24px; }
.success-icon { font-size:72px; margin-bottom:20px; }
.success-title { font-size:24px; font-weight:700; color:#1a1a1a; margin-bottom:8px; }
.success-sub { font-size:14px; color:#999; text-align:center; line-height:1.6; margin-bottom:24px; }
.divider { height:8px; background:#f5f5f5; flex-shrink:0; }
.list-item { display:flex; align-items:center; padding:14px 16px; border-bottom:1px solid #f5f5f5; background:#fff; cursor:pointer; }
.list-item:last-child { border-bottom:none; }

/* Proto Nav — collapsible two-level sidebar */
.proto-nav { position:fixed; left:0; top:0; bottom:0; width:200px; background:#111827; z-index:9999; overflow-y:auto; display:flex; flex-direction:column; border-right:1px solid rgba(255,255,255,0.07); }
.proto-nav::-webkit-scrollbar { width:4px; }
.proto-nav::-webkit-scrollbar-thumb { background:rgba(255,255,255,0.15); border-radius:2px; }
.proto-nav-title { padding:16px 14px 10px; font-size:13px; font-weight:800; color:#fff; letter-spacing:1px; border-bottom:1px solid rgba(255,255,255,0.08); flex-shrink:0; display:flex; align-items:center; gap:8px; }
.proto-nav-title span { font-size:18px; }
.proto-section-label { font-size:13px; font-weight:800; color:rgba(255,255,255,0.75); padding:14px 14px 5px; letter-spacing:0.5px; flex-shrink:0; border-top:1px solid rgba(255,255,255,0.1); }
.proto-group { flex-shrink:0; }
.proto-group-hd { display:flex; align-items:center; justify-content:space-between; padding:7px 14px; cursor:pointer; color:rgba(255,255,255,0.5); font-size:11.5px; font-weight:600; background:none; border:none; width:100%; text-align:left; border-top:1px solid rgba(255,255,255,0.05); transition:color 0.15s, background 0.15s; }
.proto-group-hd:hover { color:rgba(255,255,255,0.85); background:rgba(255,255,255,0.04); }
.proto-group-hd.open { color:#34d399; }
.proto-group-arrow { font-size:9px; flex-shrink:0; transition:transform 0.2s; display:inline-block; }
.proto-group-hd.open .proto-group-arrow { transform:rotate(90deg); }
.proto-group-body { display:none; padding:2px 0 4px; }
.proto-group-body.open { display:block; }
.proto-btn { display:block; width:100%; text-align:left; background:none; border:none; padding:5px 14px 5px 26px; font-size:11.5px; color:rgba(255,255,255,0.45); cursor:pointer; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; transition:color 0.12s, background 0.12s; }
.proto-btn:hover { color:rgba(255,255,255,0.85); background:rgba(255,255,255,0.05); }
.proto-btn.active { color:#34d399; background:rgba(52,211,153,0.1); font-weight:600; }

/* Detail hero */
.detail-hero { padding:14px 16px 12px; flex-shrink:0; }
.detail-hero.purple { background:linear-gradient(135deg,#7c3aed,#a855f7); color:#fff; }
.detail-hero.green { background:linear-gradient(135deg,#07c160,#09a151); color:#fff; }
.hero-type { font-size:12px; opacity:0.8; margin-bottom:2px; display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.hero-title { font-size:13px; opacity:0.85; margin-bottom:8px; }
.hero-org { display:flex; align-items:center; gap:8px; font-size:13px; opacity:0.9; }
.hero-nav { display:flex; justify-content:space-between; align-items:center; margin-bottom:12px; }
.circle-btn { width:36px; height:36px; border-radius:50%; background:rgba(255,255,255,0.2); display:flex; align-items:center; justify-content:center; cursor:pointer; font-size:18px; border:none; color:#fff; }

/* Activity progress bar (5-step state machine) */
.act-progress { padding:10px 16px 14px; background:#fff; flex-shrink:0; border-bottom:1px solid #f0f0f0; }
.act-steps { display:flex; align-items:flex-start; }
.act-step { flex:1; display:flex; flex-direction:column; align-items:center; position:relative; }
.act-step:not(:last-child)::after { content:''; position:absolute; top:10px; left:50%; width:100%; height:2px; background:#e8e8e8; z-index:0; }
.act-step.done:not(:last-child)::after { background:#07c160; }
.act-step.active:not(:last-child)::after { background:#e8e8e8; }
.act-dot { width:20px; height:20px; border-radius:50%; background:#e8e8e8; z-index:1; display:flex; align-items:center; justify-content:center; font-size:10px; color:#fff; position:relative; flex-shrink:0; }
.act-step.done .act-dot { background:#07c160; }
.act-step.active .act-dot { background:#7c3aed; box-shadow:0 0 0 3px rgba(124,58,237,0.15); }
.act-label { font-size:9px; color:#bbb; margin-top:4px; text-align:center; line-height:1.3; white-space:nowrap; }
.act-step.done .act-label { color:#07c160; }
.act-step.active .act-label { color:#7c3aed; font-weight:600; }

/* Profile header */
.profile-header { padding:44px 20px 20px; flex-shrink:0; }
.profile-header.green { background:linear-gradient(135deg,#07c160,#09a151); color:#fff; }
.profile-header.purple { background:linear-gradient(135deg,#7c3aed,#a855f7); color:#fff; }
.profile-info { display:flex; align-items:center; gap:14px; margin-bottom:16px; }
.profile-name { font-size:20px; font-weight:700; color:#fff; }
.profile-sub { font-size:13px; color:rgba(255,255,255,0.8); margin-top:4px; }
.stats-row { display:flex; gap:0; background:#fff; border-radius:12px; overflow:hidden; margin:0 16px; }
.stat-item { flex:1; text-align:center; padding:14px 0; border-right:1px solid #f0f0f0; }
.stat-item:last-child { border-right:none; }
.stat-num { font-size:20px; font-weight:700; color:#1a1a1a; }
.stat-label { font-size:11px; color:#999; margin-top:2px; }

/* Chat */
.chat-msg { display:flex; gap:8px; padding:8px 16px; }
.chat-msg.me { flex-direction:row-reverse; }
.chat-bubble { background:#fff; border-radius:12px; padding:10px 12px; font-size:14px; color:#1a1a1a; max-width:220px; line-height:1.5; }
.chat-bubble.mine { background:#07c160; color:#fff; }
.chat-bubble.system { background:#f0f0f0; color:#999; font-size:12px; text-align:center; padding:6px 12px; }
.chat-sys { text-align:center; padding:8px 16px; }

/* GPS circle */
.gps-circle { width:160px; height:160px; border-radius:50%; background:#07c160; display:flex; flex-direction:column; align-items:center; justify-content:center; color:#fff; font-size:18px; font-weight:700; cursor:pointer; margin:0 auto; box-shadow:0 0 0 20px rgba(7,193,96,0.15), 0 0 0 40px rgba(7,193,96,0.08); }
.gps-circle.red { background:#ff4d4f; box-shadow:0 0 0 20px rgba(255,77,79,0.15); }

/* Countdown */
.countdown-big { font-size:56px; font-weight:700; color:#1a1a1a; text-align:center; font-variant-numeric:tabular-nums; }

/* 搭米 header */
.搭米-header { background:linear-gradient(135deg,#fa8c16,#d46b08); color:#fff; padding:44px 20px 24px; flex-shrink:0; }
.搭米-balance { font-size:52px; font-weight:700; margin:8px 0; }
.搭米-label { font-size:14px; opacity:0.85; }

/* Green gradient bg */
.green-bg { background:linear-gradient(160deg,#07c160,#09a151); flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; padding:40px 24px; color:#fff; }

/* Radio / checkbox */
.radio-group { display:flex; flex-wrap:wrap; gap:8px; }
.radio-opt { display:flex; align-items:center; gap:6px; padding:8px 14px; border:1px solid #e0e0e0; border-radius:8px; cursor:pointer; font-size:14px; }
.radio-opt.active { border-color:#07c160; color:#07c160; background:#e8f7ef; }
.radio-dot { width:16px; height:16px; border-radius:50%; border:2px solid #ccc; display:inline-block; flex-shrink:0; }
.radio-opt.active .radio-dot { border-color:#07c160; background:#07c160; }

/* Participant slot row */
.participant-row { display:flex; gap:8px; align-items:center; flex-wrap:wrap; padding:12px 16px; }
.p-slot { display:flex; flex-direction:column; align-items:center; gap:4px; }
.p-name { font-size:11px; color:#999; max-width:48px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.p-status { font-size:10px; }

/* Confirm/vote card */
.vote-card { background:#fff; border-radius:12px; margin:8px 16px; padding:16px; }

/* ── Mobile: collapsible sidebar ── */
.nav-toggle-btn {
  display: none;
  position: fixed;
  bottom: 24px;
  left: 16px;
  z-index: 10000;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #07c160;
  color: #fff;
  border: none;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.nav-toggle-btn.open { background: #ff4d4f; }
.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 9998;
}
.nav-backdrop.show { display: block; }
@media (max-width: 700px) {
  .layout { padding-left: 16px !important; }
  .proto-nav {
    transform: translateX(-110%);
    transition: transform 0.25s cubic-bezier(.4,0,.2,1);
    box-shadow: none;
  }
  .proto-nav.mobile-open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0,0,0,0.35);
    z-index: 9999;
  }
  .nav-toggle-btn { display: flex; }
}
