@charset "UTF-8";
/* FitLife v7 — 移动优先样式 */

:root {
  --p: #4CAF50; --pd: #388E3C; --a: #FF9800; --d: #f44336;
  --bg: #f5f6fa; --card: #fff; --text: #2c3e50; --tl: #7f8c8d; --b: #e0e0e0;
  --r: 12px; --rs: 8px;
}
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { -webkit-overflow-scrolling:touch; -webkit-tap-highlight-color:transparent; overflow-x:hidden; }
body { font-family:-apple-system,BlinkMacSystemFont,'Segoe UI','PingFang SC','Microsoft YaHei',sans-serif; background:var(--bg); color:var(--text); line-height:1.6; min-height:100vh; min-height:100dvh; max-width:100vw; word-wrap:break-word; padding-bottom:env(safe-area-inset-bottom,0); }
img { max-width:100%; height:auto; }
a { color:var(--p); text-decoration:none; }
input,button,textarea,select { font-family:inherit; font-size:16px; }

/* 导航栏 */
.navbar { background:linear-gradient(135deg,#1a1a2e,#16213e,#0f3460); color:#fff; display:flex; align-items:center; justify-content:space-between; padding:0 20px; height:60px; position:sticky; top:0; z-index:1000; }
.nb-brand { font-weight:700; font-size:1.1rem; display:flex; align-items:center; gap:6px; }
.nb-logo { font-size:1.3rem; }
.nb-toggle { display:none; background:none; border:none; color:#fff; font-size:1.6rem; cursor:pointer; min-width:44px; min-height:44px; }
.nb-menu { display:flex; gap:4px; }
.nb-menu a { color:rgba(255,255,255,.8); padding:8px 12px; border-radius:var(--rs); font-size:.9rem; transition:.2s; }
.nb-menu a:hover,.nb-menu a.active { color:#fff; background:rgba(255,255,255,.1); }
.nb-user { display:flex; align-items:center; gap:8px; flex-shrink:0; }
.sb { background:rgba(255,152,0,.2); color:#FF9800; padding:3px 10px; border-radius:20px; font-size:.75rem; font-weight:600; }
.ua { width:32px; height:32px; border-radius:50%; background:var(--p); display:flex; align-items:center; justify-content:center; font-weight:700; font-size:.85rem; }
.btn-out { background:none; border:none; color:#ff6b6b; cursor:pointer; font-size:.9rem; padding:4px 8px; }
.btn-sync { background:none; border:none; cursor:pointer; font-size:1rem; padding:4px; min-height:44px; opacity:.7; transition:.2s; }
.btn-sync:hover { opacity:1; }
.sd { display:inline-block; width:8px; height:8px; border-radius:50%; background:var(--b); margin-right:4px; }
.sd.ok { background:var(--p); }

@media (max-width:900px) {
  .nb-toggle { display:block; }
  .navbar { flex-wrap:wrap; height:auto; min-height:56px; padding:8px 12px; }
  .nb-menu { display:none; width:100%; flex-direction:column; padding:8px 0; order:3; }
  .nb-menu.open { display:flex; }
  .nb-menu a { padding:10px 16px; width:100%; }
  .nb-user { margin-left:auto; gap:6px; }
  .nb-user .sb { padding:2px 8px; font-size:.7rem; }
}

/* 容器 */
.container { max-width:1100px; margin:0 auto; padding:16px; }
.page-header { margin-bottom:20px; }
.page-header h1 { font-size:1.5rem; }

/* 卡片 */
.card { background:var(--card); border-radius:var(--r); padding:20px; margin-bottom:16px; box-shadow:0 2px 12px rgba(0,0,0,.06); }
.card-h { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; padding-bottom:10px; border-bottom:1px solid var(--b); flex-wrap:wrap; gap:8px; }
.card-h h2 { font-size:1.1rem; }

/* 表单 */
.fg { margin-bottom:16px; }
.fg label { display:block; margin-bottom:4px; font-weight:600; font-size:.9rem; }
.fc { width:100%; padding:12px 14px; border:2px solid var(--b); border-radius:var(--rs); font-size:16px; background:#fafafa; transition:.2s; }
.fc:focus { outline:none; border-color:var(--p); background:#fff; box-shadow:0 0 0 3px rgba(76,175,80,.1); }
textarea.fc { resize:vertical; min-height:80px; }

/* 按钮 */
.btn { display:inline-block; padding:10px 22px; border:none; border-radius:var(--rs); font-size:.9rem; font-weight:600; cursor:pointer; transition:.2s; text-align:center; }
.btn:active { transform:scale(.97); }
.btn-p { background:var(--p); color:#fff; }
.btn-p:hover { background:var(--pd); }
.btn-o { background:transparent; border:2px solid var(--b); color:var(--text); }
.btn-o:hover { border-color:var(--p); color:var(--p); }
.btn-d { background:var(--d); color:#fff; }
.btn-d:hover { background:#c62828; }
.btn-s { padding:6px 14px; font-size:.8rem; }
.btn-lg { padding:14px 28px; font-size:1rem; }
.btn-block { display:block; width:100%; }

/* 提示 */
.alert { padding:12px 16px; border-radius:var(--rs); margin-bottom:14px; font-size:.9rem; }
.alert-success { background:#E8F5E9; color:#2E7D32; border:1px solid #C8E6C9; }
.alert-danger { background:#FFEBEE; color:#C62828; border:1px solid #FFCDD2; }
.alert-info { background:#E3F2FD; color:#1565C0; border:1px solid #BBDEFB; }
.alert-warning { background:#FFF3E0; color:#E65100; border:1px solid #FFE0B2; }

/* 徽章 */
.badge { display:inline-block; padding:2px 10px; border-radius:20px; font-size:.75rem; font-weight:600; }
.badge-success { background:#E8F5E9; color:#2E7D32; }
.badge-danger { background:#FFEBEE; color:#C62828; }
.badge-warning { background:#FFF3E0; color:#E65100; }
.badge-info { background:#E3F2FD; color:#1565C0; }

/* 网格 */
.grid-2,.grid-3,.grid-4 { display:grid; gap:14px; }
.grid-2 { grid-template-columns:repeat(2,1fr); }
.grid-3 { grid-template-columns:repeat(3,1fr); }
.grid-4 { grid-template-columns:repeat(4,1fr); }
@media (max-width:768px) { .grid-2,.grid-3,.grid-4 { grid-template-columns:1fr; } }

/* 统计卡 */
.stat-card { background:var(--card); border-radius:var(--r); padding:18px; text-align:center; box-shadow:0 1px 6px rgba(0,0,0,.04); }
.stat-card .sv { font-size:2rem; font-weight:800; color:var(--p); }
.stat-card .sl { font-size:.8rem; color:var(--tl); margin-top:4px; }

/* 表格 */
.table-wrap { overflow-x:auto; -webkit-overflow-scrolling:touch; }
table { width:100%; border-collapse:collapse; font-size:.9rem; }
th,td { padding:10px 14px; text-align:left; border-bottom:1px solid var(--b); }
th { background:#fafafa; font-weight:700; white-space:nowrap; }

/* 空状态 */
.empty { text-align:center; padding:40px 20px; }
.empty .ei { font-size:3rem; display:block; margin-bottom:12px; }
.empty p { color:var(--tl); }

/* Toast */
.toast-container { position:fixed; top:70px; right:12px; z-index:9999; display:flex; flex-direction:column; gap:8px; }
.toast { padding:12px 20px; border-radius:var(--rs); color:#fff; font-size:.9rem; animation:slideIn .3s ease; max-width:340px; }
.toast-success { background:#4CAF50; }
.toast-error { background:#f44336; }
.toast-info { background:#2196F3; }
.toast-warning { background:#FF9800; }
@keyframes slideIn { from { opacity:0; transform:translateX(100%); } to { opacity:1; transform:translateX(0); } }

/* 模态框 */
.modal-bg { position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,.5); display:flex; align-items:center; justify-content:center; z-index:2000; }
.modal-bg.hidden { display:none; }
.modal { background:var(--card); border-radius:var(--r); padding:24px; width:90%; max-width:500px; max-height:90vh; overflow-y:auto; }
.modal h3 { margin-bottom:16px; }
@media (max-width:600px) { .modal-bg { align-items:flex-end; } .modal { border-radius:var(--r) var(--r) 0 0; width:100%; max-width:100%; margin-bottom:0; padding-bottom:calc(20px + env(safe-area-inset-bottom,0)); } }

/* 危险区 */
.danger-zone { margin-top:20px; padding:18px; background:#FFF5F5; border:2px dashed #FFCDD2; border-radius:var(--r); text-align:center; }
.danger-zone h3 { color:#C62828; font-size:1rem; margin-bottom:4px; }
.danger-zone p { color:#999; font-size:.8rem; margin-bottom:10px; }

/* 杂项 */
.mt-1 { margin-top:8px; } .mt-2 { margin-top:14px; } .mt-3 { margin-top:20px; }
.mb-1 { margin-bottom:8px; } .mb-2 { margin-bottom:14px; }
.text-muted { color:var(--tl); font-size:.85rem; }
.text-center { text-align:center; }
.flex { display:flex; } .flex-wrap { flex-wrap:wrap; } .gap-sm { gap:8px; } .gap { gap:14px; }
.items-center { align-items:center; } .justify-between { justify-content:space-between; }

/* Tab 横向滚动 */
.tabs { display:flex; gap:6px; margin-bottom:18px; }
.tabs-scroll { flex-wrap:nowrap; overflow-x:auto; -webkit-overflow-scrolling:touch; padding-bottom:8px; }
.tab { padding:10px 18px; border:2px solid var(--b); border-radius:var(--rs); background:#fff; cursor:pointer; font-weight:600; font-size:.85rem; white-space:nowrap; flex-shrink:0; transition:.2s; }
.tab:hover { border-color:var(--p); }
.tab.active { background:var(--p); color:#fff; border-color:var(--p); }

/* 移动端响应式 */
@media (max-width:600px) {
  .container { padding:10px; }
  .card { padding:14px; margin-bottom:10px; }
  .page-header h1 { font-size:1.2rem; }
  .stat-card { padding:14px 10px; }
  .stat-card .sv { font-size:1.5rem; }
  .toast-container { left:8px; right:8px; }
  .toast { max-width:100%; }
}

@media (max-width:360px) {
  .container { padding:6px; }
  .card { padding:10px; }
  .btn { padding:8px 16px; font-size:.8rem; }
  h1 { font-size:1.2rem; }
  h2 { font-size:1rem; }
}
