/* ---------- 首页：活动列表 ---------- */
.empty-state {
  margin: 40px 20px;
  text-align: center;
  color: var(--forest);
}
.empty-state .big {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 6px;
}
.empty-state p {
  color: #6b6a5e;
  font-size: 14px;
  line-height: 1.6;
}

.trip-card {
  background: #fff;
  border: 1px solid rgba(228,220,199,0.7);
  border-radius: var(--radius);
  padding: 18px 18px;
  margin: 0 18px 14px;
  display: block;
  transition: transform .15s ease, box-shadow .15s ease;
  box-shadow: var(--shadow-sm);
}
.trip-card:active { transform: scale(0.975); box-shadow: var(--shadow-md); }
.trip-card .name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  color: var(--forest);
}
.trip-code {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-body);
  background: var(--paper-dk);
  color: #7a7867;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 6px;
  margin-left: 8px;
  vertical-align: middle;
  letter-spacing: 1px;
}
.trip-card .sub {
  margin-top: 4px;
  font-size: 13px;
  color: #7a7867;
}
.trip-card .progress-row {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.bar {
  flex: 1;
  height: 8px;
  border-radius: 8px;
  background: var(--paper-dk);
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.06);
}
.bar > i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--amber), #f0a86e);
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(232,147,90,0.4);
}
.progress-text {
  font-size: 12.5px;
  color: var(--forest);
  font-weight: 600;
  white-space: nowrap;
}

/* 首页固定悬浮按钮 */
.fab-fixed {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 72px);
  max-width: 488px;
  background: linear-gradient(135deg, var(--amber) 0%, #d97b3f 100%);
  color: #fff;
  font-weight: 700;
  font-family: var(--font-display);
  font-size: 16px;
  padding: 16px 18px;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: 0 8px 28px rgba(232, 147, 90, 0.45), inset 0 1px 0 rgba(255,255,255,0.2);
  transition: transform .12s ease, box-shadow .12s ease;
  letter-spacing: 0.3px;
  z-index: 20;
}
.fab-fixed:active { transform: translateX(-50%) scale(0.96); box-shadow: 0 4px 12px rgba(232,147,90,0.3); }

/* ---------- 表单 ---------- */

.field {
  margin-bottom: 12px;
}
.field label {
  display: block;
  font-size: 13px;
  color: var(--forest);
  font-weight: 600;
  margin-bottom: 6px;
}
.field input, .field textarea, .field select {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
  background: var(--paper);
  color: var(--ink);
}
/* 日期输入框移动端防溢出 */
.field input[type="date"] {
  min-width: 0;
  max-width: 100%;
  -webkit-appearance: none;
  appearance: none;
}
.field {
  overflow: hidden;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--amber);
}
.field-row {
  display: flex;
  gap: 10px;
}
.field-row .field { flex: 1; min-width: 0; }
/* 小屏下日期/下拉框纵向堆，避免重叠 */
@media (max-width: 420px) {
  .field-row {
    flex-direction: column;
    gap: 0;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 16px;
  border-radius: 11px;
  font-weight: 600;
  font-size: 15px;
}
.btn-amber { background: linear-gradient(135deg, var(--amber), #d97b3f); color: #fff; box-shadow: 0 3px 10px rgba(232,147,90,0.3); }
.btn-amber:active { background: var(--amber-dk); transform: scale(0.97); }
.btn-outline { background: #fff; border: 1.5px solid var(--line); color: var(--forest); }
.btn-outline:active { background: var(--paper-dk); }
.btn-block { width: 100%; }


/* ---------- 进度总览条 ---------- */
.overview {
  margin: 8px 14px 4px;
  background: linear-gradient(135deg, #1a3328 0%, var(--forest) 60%, #2a5040 100%);
  border-radius: 12px;
  padding: 12px 16px;
  color: var(--paper);
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-md);
}
.overview .num {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
}
.overview .num small {
  font-size: 14px;
  font-weight: 500;
  opacity: 0.8;
}
.overview .label {
  font-size: 12.5px;
  color: var(--moss);
  margin-top: 2px;
}
.overview .bar { background: rgba(255,255,255,0.18); }
.overview .bar > i { background: var(--amber); }

/* ---------- 物品：行李签卡片（signature element） ---------- */
.item-tag {
  position: relative;
  background: #fff;
  border: 1.5px dashed var(--line);
  border-radius: 12px;
  margin: 0 14px 8px;
  padding: 10px 12px 10px 30px;
}
.item-tag::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 2px solid var(--moss);
  background: var(--paper);
}
.item-tag.done {
  border-style: solid;
  border-color: var(--amber);
  background: #FFF9F2;
}
.item-tag.done::before {
  background: var(--amber);
  border-color: var(--amber);
}
.item-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.item-name {
  font-weight: 600;
  font-size: 14.5px;
  color: var(--ink);
}
.item-need {
  font-size: 12.5px;
  color: var(--forest);
  font-weight: 600;
  white-space: nowrap;
}
.item-cat {
  font-size: 11.5px;
  color: var(--moss);
  margin-top: 2px;
}
.claims-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}
.claim-chip {
  background: var(--paper-dk);
  border-radius: 999px;
  padding: 4px 9px 4px 10px;
  font-size: 12px;
  color: var(--forest);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.claim-chip .x {
  color: var(--clay);
  font-weight: 700;
  padding: 0 2px;
  font-size: 14px;
  line-height: 1;
}
.item-actions {
  margin-top: 6px;
  display: flex;
  gap: 8px;
}
.claim-btn {
  background: linear-gradient(135deg, var(--forest), var(--forest-lt));
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  transition: transform .1s ease;
}
.claim-btn:active { transform: scale(0.95); }
.del-btn {
  color: #a39d86;
  font-size: 12.5px;
  padding: 6px 4px;
}

.category-heading {
  margin: 10px 14px 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--moss);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

/* ---------- 悬浮添加按钮 ---------- */
.add-item-bar {
  margin: 6px 18px 4px;
}

/* ---------- 活动码门禁 ---------- */
.code-gate {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 24px 40px;
  text-align: center;
}
.code-gate-icon {
  font-size: 48px;
  margin-bottom: 16px;
}
.code-gate-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--forest);
  margin-bottom: 8px;
}
.code-gate-desc {
  font-size: 13.5px;
  color: #7a7867;
  margin: 0 0 28px;
}
.code-inputs {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}
.code-digit {
  width: 56px;
  height: 64px;
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  font-family: var(--font-display);
  border: 2px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--forest);
  caret-color: var(--amber);
  transition: border-color .15s, box-shadow .15s;
}
.code-digit:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(232,147,90,0.15);
}
.code-error {
  font-size: 13px;
  color: var(--clay);
  min-height: 20px;
  margin-bottom: 12px;
}
.code-gate .btn-block {
  max-width: 260px;
}

/* ---------- 归档状态 ---------- */

.trip-card.archived {
  opacity: 0.7;
  border-style: dashed;
}
.archived-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  background: var(--paper-dk);
  color: #7a7867;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 6px;
  margin-right: 6px;
  vertical-align: middle;
}
.archived-banner {
  background: var(--paper-dk);
  border-bottom: 1px solid var(--line);
  text-align: center;
  font-size: 13px;
  color: #7a7867;
  padding: 10px 16px;
  font-weight: 500;
}

/* ---------- 认领满额闪烁 ---------- */
@keyframes claim-flash {
  0%, 100% { box-shadow: var(--shadow-sm); }
  50% { box-shadow: 0 0 0 4px rgba(232,147,90,0.35); }
}
.item-tag.just-done {
  animation: claim-flash .6s ease 2;
}

/* ---------- 模板选择 ---------- */
.template-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}
.template-card {
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, transform .12s;
}
.template-card:active { transform: scale(.97); }
.template-card.selected {
  border-color: var(--amber);
  background: #FFF9F2;
}
.template-card .t-icon { font-size: 22px; margin-bottom: 4px; }
.template-card .t-name { font-size: 13px; font-weight: 600; color: var(--forest); }
.template-card .t-count { font-size: 11px; color: #a39d86; margin-top: 2px; }
