* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: linear-gradient(135deg, #0b3d5f 0%, #1a6b8a 50%, #2ba0b0 100%);
  min-height: 100vh;
  padding: 12px;
  color: #1a2a3a;
}
.app { max-width: 560px; margin: 0 auto; }

/* ===== 顶部 ===== */
.header {
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(12px);
  border-radius: 20px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.header h1 { font-size: 20px; color: #fff; letter-spacing: 1px; }
.header h1 span { margin-right: 4px; }
.nav-tabs { display: flex; gap: 4px; }
.nav-tab {
  background: rgba(255,255,255,0.2);
  border: none;
  color: #fff;
  padding: 6px 12px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.nav-tab.active {
  background: #fff;
  color: #0b3d5f;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}
.nav-tab:active { transform: scale(0.93); }

/* ===== 卡片 ===== */
.card {
  background: #fff;
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.10);
  margin-bottom: 12px;
  animation: fadeUp 0.35s ease;
}
@keyframes fadeUp {
  0% { opacity: 0; transform: translateY(16px); }
  100% { opacity: 1; transform: translateY(0); }
}
.card-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ===== 多列布局 ===== */
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row-2 .card { margin-bottom: 0; }
.row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.row-3 .card { margin-bottom: 0; }
.row-4 { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 10px; }
.row-4 .card { margin-bottom: 0; }
@media (max-width: 700px) { .row-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .row-3 { grid-template-columns: 1fr 1fr; } }

/* ===== 选择器 ===== */
.selector-group { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: #f0f4f8;
  border: 2px solid transparent;
  border-radius: 30px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  color: #3a5a6a;
  user-select: none;
}
.chip:active { transform: scale(0.94); }
.chip.selected {
  background: #e0f2fe;
  border-color: #0ea5e9;
  color: #0369a1;
}
.chip.emoji-big { font-size: 16px; padding: 7px 12px; }
.chip-remove {
  display: inline-block;
  margin-left: 4px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  vertical-align: middle;
  transition: color 0.2s;
}
.chip-remove:hover { color: #ef4444; }

/* ===== 按钮 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: 30px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s;
  width: 100%;
}
.btn:active { transform: scale(0.95); }
.btn-primary {
  background: linear-gradient(135deg, #0ea5e9, #3b82f6);
  color: #fff;
  box-shadow: 0 4px 15px rgba(14,165,233,0.35);
}
.btn-success {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  box-shadow: 0 4px 15px rgba(16,185,129,0.35);
}
.btn-sm { padding: 8px 16px; font-size: 13px; width: auto; }

/* ===== 输入框 ===== */
.input-group { display: flex; gap: 8px; margin-bottom: 10px; }
.input-group input {
  flex: 1;
  border: 2px solid #dde8f0;
  border-radius: 30px;
  padding: 10px 16px;
  font-size: 15px;
  outline: none;
  transition: border 0.2s;
}
.input-group input:focus { border-color: #0ea5e9; }

/* ===== 清单条目 ===== */
.list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #eef4f8;
  animation: fadeUp 0.3s ease;
}
.list-item:last-child { border-bottom: none; }
.list-item .check {
  width: 22px; height: 22px;
  border: 2px solid #c0d0dc;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: all 0.2s;
  flex-shrink: 0;
}
.list-item .check.checked { background: #10b981; border-color: #10b981; color: #fff; }
.list-item .info { flex: 1; min-width: 0; }
.list-item .name { font-size: 14px; font-weight: 600; }
.list-item .meta { font-size: 11px; color: #7a9aaa; margin-top: 1px; }
.list-item .reason { font-size: 11px; color: #8b7e6a; margin-top: 2px; line-height: 1.4; }
.list-item .price { font-size: 14px; font-weight: 700; color: #0ea5e9; white-space: nowrap; }

/* ===== 预算条 ===== */
.budget-bar {
  background: #eef4f8;
  border-radius: 30px;
  height: 10px;
  overflow: hidden;
  margin: 8px 0 10px;
}
.budget-bar .fill {
  height: 100%;
  border-radius: 30px;
  background: linear-gradient(90deg, #10b981, #0ea5e9);
  transition: width 0.5s ease;
}
.budget-bar .fill.over { background: linear-gradient(90deg, #f59e0b, #ef4444); }
.budget-summary {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  color: #3a5a6a;
  margin-bottom: 8px;
}

/* ===== 档案 ===== */
.archive-item {
  background: #f8fafc;
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 8px;
  border-left: 4px solid #0ea5e9;
  animation: fadeUp 0.3s ease;
}
.archive-item .top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.archive-item .disaster { font-weight: 700; font-size: 14px; }
.archive-item .date { font-size: 11px; color: #7a9aaa; }
.archive-item .progress-row { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.archive-item .mini-bar {
  flex: 1; height: 7px;
  background: #e0e8f0;
  border-radius: 20px;
  overflow: hidden;
}
.archive-item .mini-bar .fill {
  height: 100%;
  border-radius: 20px;
  background: linear-gradient(90deg, #10b981, #0ea5e9);
  transition: width 0.5s;
}
.archive-item .pct { font-size: 12px; font-weight: 700; color: #0ea5e9; }

/* ===== 弹窗遮罩 ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}
.modal-box {
  background: #fff;
  border-radius: 20px;
  padding: 28px 24px 20px;
  max-width: 320px;
  width: 90%;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
  animation: popIn 0.3s ease;
}
@keyframes popIn {
  0% { opacity: 0; transform: scale(0.85); }
  100% { opacity: 1; transform: scale(1); }
}
.modal-box .modal-icon { font-size: 44px; margin-bottom: 10px; }
.modal-box .modal-msg {
  font-size: 15px;
  font-weight: 600;
  color: #1a2a3a;
  line-height: 1.5;
  margin-bottom: 16px;
}
.modal-box .modal-btn {
  background: linear-gradient(135deg, #0ea5e9, #3b82f6);
  color: #fff;
  border: none;
  border-radius: 30px;
  padding: 10px 36px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.modal-box .modal-btn:active { transform: scale(0.93); }

/* ===== 空状态 ===== */
.empty { text-align: center; padding: 20px 0; color: #7a9aaa; font-size: 14px; }
.empty .big { font-size: 40px; margin-bottom: 8px; }

/* ===== 隐藏 ===== */
.hidden { display: none !important; }

/* ===== 清单结果区 ===== */
.result-section { margin-top: 12px; }
.result-section .section-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #1a2a3a;
}
.result-section .section-header .badge {
  background: #e0f2fe;
  color: #0369a1;
  font-size: 11px;
  padding: 2px 10px;
  border-radius: 20px;
  font-weight: 600;
}

/* 档案页空状态 */
.archive-empty {
  text-align: center;
  padding: 40px 0;
  color: rgba(255,255,255,0.7);
}
.archive-empty .big { font-size: 56px; margin-bottom: 12px; }
.archive-empty p { font-size: 15px; }
