* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', Arial, sans-serif; background: #f5f5f5; color: #333; font-size: 14px; overflow-x: hidden; }
:root {
  --primary: #C8102E;
  --primary-dark: #9B0B23;
  --gold: #D4A017;
  --gold-light: #F5E6B3;
  --gold-dark: #B8860B;
  --bg: #f5f5f5;
  --white: #ffffff;
  --text-main: #1a1a1a;
  --text-sub: #666666;
  --text-light: #999999;
  --border: #e8e8e8;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.page { display: none; min-height: 100vh; }
.page.active { display: block; }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; border: none; border-radius: 24px; padding: 12px 28px; font-size: 15px; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.btn-primary:active { transform: scale(0.97); opacity: 0.9; }
.btn-gold { background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: #fff; border: none; border-radius: 24px; padding: 12px 28px; font-size: 15px; font-weight: 600; cursor: pointer; }
.btn-outline { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); border-radius: 24px; padding: 10px 24px; font-size: 14px; cursor: pointer; }
.btn-block { width: 100%; display: block; }
.card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.section-title { font-size: 16px; font-weight: 700; color: var(--text-main); padding: 16px 16px 8px; display: flex; align-items: center; justify-content: space-between; }
.section-title .more { font-size: 12px; color: var(--text-light); font-weight: 400; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; }
.badge-red { background: #ffecec; color: var(--primary); }
.badge-gold { background: var(--gold-light); color: var(--gold-dark); }
.badge-green { background: #e8f8f0; color: #2ecc71; }
.badge-blue { background: #e8f0ff; color: #3a7bd5; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.tag-vip { color: #FF6B35; background: #FFF0E8; border-radius: 4px; padding: 1px 6px; font-size: 11px; font-weight: 700; }
.tag-director { color: #9B59B6; background: #F5EEFF; border-radius: 4px; padding: 1px 6px; font-size: 11px; font-weight: 700; }
.tag-manager { color: #3A7BD5; background: #E8F0FF; border-radius: 4px; padding: 1px 6px; font-size: 11px; font-weight: 700; }
.tag-gm { color: #D4A017; background: #FFF9E6; border-radius: 4px; padding: 1px 6px; font-size: 11px; font-weight: 700; }
.tag-office { color: #C8102E; background: #FFE8EC; border-radius: 4px; padding: 1px 6px; font-size: 11px; font-weight: 700; }
.toast { position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%) scale(0.9); background: rgba(0,0,0,0.75); color: #fff; padding: 12px 24px; border-radius: 24px; font-size: 14px; z-index: 9999; opacity: 0; transition: all 0.2s; pointer-events: none; white-space: nowrap; }
.toast.show { opacity: 1; transform: translate(-50%,-50%) scale(1); }
.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1000; display: none; align-items: flex-end; }
.modal-mask.open { display: flex; }
.modal-box { background: var(--white); border-radius: 20px 20px 0 0; width: 100%; max-height: 80vh; overflow-y: auto; padding: 20px 16px 40px; }
.modal-title { font-size: 17px; font-weight: 700; text-align: center; margin-bottom: 20px; position: relative; }
.modal-close { position: absolute; right: 0; top: 0; font-size: 20px; cursor: pointer; color: var(--text-light); }
.loading { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 120px; color: var(--text-light); }
.loading::before { content: ''; width: 32px; height: 32px; border: 3px solid #eee; border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; margin-bottom: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { display: flex; flex-direction: column; align-items: center; padding: 40px; color: var(--text-light); }
.empty-icon { font-size: 48px; margin-bottom: 12px; }
input, textarea { outline: none; border: 1.5px solid var(--border); border-radius: 8px; padding: 10px 14px; font-size: 14px; color: var(--text-main); width: 100%; transition: border-color 0.2s; }
input:focus, textarea:focus { border-color: var(--primary); }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; color: var(--text-sub); margin-bottom: 6px; font-weight: 500; }
.progress-bar { height: 6px; background: #eee; border-radius: 3px; overflow: hidden; }
.progress-bar .fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--gold)); border-radius: 3px; transition: width 0.5s; }
.divider { height: 1px; background: var(--border); margin: 0 16px; }
.safe-bottom { padding-bottom: env(safe-area-inset-bottom, 20px); }
