/* ===== 全迹录 Copilot 样式（由原 index.html <style> 原样迁移） ===== */
/* ===== 全局变量 & 重置 ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #f4f8fe;
  --card: #ffffff;
  --ink: #0f2a3f;
  --muted: #5b738b;
  --line: #dce6f0;
  --nav: #132d44;
  --blue: #1a5a8c;
  --blue2: #2e7db6;
  --soft: #eaf2fa;
  --green: #2a7a5e;
  --warn: #9e741f;
  --red: #a14242;
  --shadow: 0 6px 20px rgba(18, 40, 66, 0.06);
  --radius: 18px;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  padding-bottom: 72px;
  line-height: 1.5;
}
/* ===== 通用卡片 & 布局 ===== */
.app { max-width: 600px; margin: 0 auto; padding: 16px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 16px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-weight: 700;
  font-size: 16px;
}
.badge {
  display: inline-block;
  background: var(--soft);
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 30px;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 30px;
  font-size: 11px;
  font-weight: 600;
  background: #eef3f8;
  color: #1f4b6e;
}
.pill.a { background: #ddecfb; color: #1a5a8c; }
.pill.b { background: #e3f3ec; color: #1d6b4f; }
.pill.s { background: #eae3f5; color: #5c3d82; }
.pill.warn { background: #fff1d6; color: #8a6a1a; }
.pill.red { background: #fde8e8; color: #ac3a3a; }
.btn {
  border: 0;
  background: var(--blue);
  color: white;
  padding: 10px 16px;
  border-radius: 40px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 48px;
  min-width: 48px;
}
.btn:active { opacity: 0.7; transform: scale(0.97); }
.btn.secondary { background: #e7eef6; color: var(--ink); }
.btn.green { background: var(--green); }
.btn.warn { background: var(--warn); }
.btn.red { background: var(--red); }
.btn-block { width: 100%; justify-content: center; }
.btn-small { padding: 4px 12px; min-height: auto; font-size: 12px; }
.hidden { display: none !important; }
.mt-8 { margin-top: 8px; }
.mb-8 { margin-bottom: 8px; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.text-muted { color: var(--muted); font-size: 13px; }
.flex { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gap-4 { gap: 4px; }
.text-center { text-align: center; }
/* ===== 顶部导航 ===== */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding: 0 4px;
}
.topbar h1 { font-size: 20px; font-weight: 800; }
.topbar .sub { font-size: 12px; color: var(--muted); }
/* ===== 底部固定导航 ===== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-around;
  padding: 8px 0 env(safe-area-inset-bottom, 8px) 0;
  backdrop-filter: blur(4px);
  background: rgba(255,255,255,0.94);
  z-index: 30;
}
.bottom-nav button {
  background: transparent;
  border: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 10px;
  color: var(--muted);
  font-weight: 600;
  gap: 2px;
  padding: 4px 8px;
  min-width: 56px;
  cursor: pointer;
}
.bottom-nav button.active { color: var(--blue); }
.bottom-nav button .icon { font-size: 20px; line-height: 1; }
/* ===== 首页卡片 ===== */
.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.choice {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 12px;
  cursor: pointer;
  transition: 0.15s;
  box-shadow: var(--shadow);
}
.choice:active { background: #f2f7fe; border-color: var(--blue2); }
.choice h3 { font-size: 15px; margin-bottom: 4px; }
.choice p { font-size: 12px; color: var(--muted); line-height: 1.5; margin: 0; }
/* ===== 结果框 ===== */
.result-box {
  background: #f6faff;
  border-left: 4px solid var(--blue);
  padding: 14px;
  border-radius: 12px;
  margin-top: 12px;
}
.result-box h3 { margin-bottom: 6px; font-size: 15px; }
.result-box .alert { background: #fff6e5; padding: 10px; border-radius: 10px; margin-top: 10px; }
/* ===== 项目列表 ===== */
.project-item {
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}
.project-item:last-child { border-bottom: 0; }
.project-item .meta { font-size: 12px; color: var(--muted); line-height: 1.6; }
/* ===== 表单 ===== */
input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: white;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  margin-bottom: 10px;
  outline: none;
}
textarea { border-radius: 18px; min-height: 80px; resize: vertical; }
label { font-weight: 700; font-size: 13px; display: block; margin-bottom: 4px; }
.checkbox-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 10px;
}
.checkbox-item input[type="checkbox"] {
  width: 20px;
  margin-top: 4px;
}
/* ===== 模态框 ===== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(10, 30, 48, 0.5);
  backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; z-index: 50;
}
.modal-card {
  background: white;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 28px;
  padding: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
/* ===== SOP 文库 ===== */
.sop-section { margin-bottom: 16px; }
.sop-section h4 { margin-bottom: 8px; color: var(--blue); }
.sop-section ul { padding-left: 20px; font-size: 13px; color: var(--ink); }
.sop-section li { margin-bottom: 4px; }
/* ===== 需求池 ===== */
.req-item {
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
  font-size: 13px;
}
.req-item:last-child { border-bottom: 0; }
/* ===== 标签组 ===== */
.tag-group { display: flex; flex-wrap: wrap; gap: 6px; }
/* ===== 响应式 ===== */
@media (max-width: 480px) {
  .choice-grid { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .bottom-nav button { font-size: 9px; min-width: 48px; }
}
@media (min-width: 640px) {
  .app { max-width: 720px; }
}
/* 分割线 */
hr { border: 0; border-top: 1px solid var(--line); margin: 12px 0; }
/* ===== 我的页 / 用户管理 ===== */
.meta { font-size: 13px; color: var(--ink); line-height: 1.8; }
#loginModal .modal-card { padding: 26px 22px; }
#loginModal input { text-align: left; }
#userList .btn { min-height: 32px; }
