/* ==========================================================================
   爱城旅行 · 组件库
   ========================================================================== */

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-s);
  background: var(--surface);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: all var(--t-fast);
  user-select: none;
}
.btn:hover { border-color: var(--ink); color: var(--ink); }
.btn:active { transform: translateY(.5px); }

.btn-primary {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.btn-primary:hover { background: var(--ink-deep); border-color: var(--ink-deep); color: #fff; }

.btn-dan {
  background: var(--dan);
  border-color: var(--dan);
  color: #fff;
}
.btn-dan:hover { background: var(--dan-deep); border-color: var(--dan-deep); color: #fff; }

.btn-ghost { background: transparent; border-color: var(--line-strong); }
.btn-line-ink { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-line-ink:hover { background: var(--ink); color: #fff; }
.btn-line-dan { background: transparent; border-color: var(--dan); color: var(--dan); }
.btn-line-dan:hover { background: var(--dan); color: #fff; }

.btn-text {
  height: auto;
  padding: 2px 4px;
  border: none;
  background: none;
  color: var(--ink);
  font-size: 13px;
}
.btn-text:hover { color: var(--dan); border: none; }
.btn-text.dan { color: var(--dan); }
.btn-text.dan:hover { color: var(--dan-deep); }
.btn-text.mute { color: var(--text-3); }
.btn-text.mute:hover { color: var(--text); }

.btn-s { height: 30px; padding: 0 12px; font-size: 12.5px; }
.btn-xs { height: 26px; padding: 0 10px; font-size: 12px; border-radius: var(--r-xs); }
.btn-l { height: 46px; padding: 0 30px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-icon { width: 34px; padding: 0; }
.btn-icon.btn-s { width: 30px; }

.btn:disabled, .btn.disabled {
  opacity: .45;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-group { display: inline-flex; gap: 8px; flex-wrap: wrap; }

/* ---------------- 卡片 ---------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
}
.card-pad { padding: 20px; }
.card-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--line);
}
.card-hd h3, .card-hd h4 { margin: 0; font-size: 15px; }
.card-bd { padding: 20px; }
.card-ft { padding: 14px 20px; border-top: 1px solid var(--line); background: var(--surface-2); }

.card-hover { transition: box-shadow var(--t), border-color var(--t), transform var(--t); }
.card-hover:hover { border-color: var(--line-strong); box-shadow: var(--sh-2); }

/* ---------------- 徽章 / 标签 ---------------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 21px;
  padding: 0 7px;
  font-size: 11.5px;
  line-height: 1;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-xs);
  color: var(--text-2);
  background: var(--surface);
  white-space: nowrap;
}
.tag-ink { border-color: var(--ink); color: var(--ink); background: var(--ink-tint); }
.tag-dan { border-color: var(--dan); color: var(--dan); background: var(--dan-soft); }
.tag-gold { border-color: var(--gold); color: var(--gold); background: var(--gold-soft); }
.tag-plain { border-color: var(--line); background: var(--surface-2); color: var(--text-3); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 23px;
  padding: 0 9px;
  font-size: 12px;
  line-height: 1;
  border-radius: var(--r-xs);
  white-space: nowrap;
  border: 1px solid transparent;
}
.badge::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}
.badge-ok { background: var(--ok-soft); color: var(--ok); border-color: #cfe3d6; }
.badge-warn { background: var(--warn-soft); color: var(--warn); border-color: #ecdcbd; }
.badge-danger { background: var(--danger-soft); color: var(--danger); border-color: #eccdc6; }
.badge-info { background: var(--info-soft); color: var(--info); border-color: #cfe0e4; }
.badge-mute { background: var(--surface-2); color: var(--text-3); border-color: var(--line); }

.dot-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  font-size: 11px;
  line-height: 1;
  color: #fff;
  background: var(--dan);
  border-radius: var(--r-pill);
}

/* ---------------- 表单 ---------------- */
.field { margin-bottom: 18px; }
.field:last-child { margin-bottom: 0; }
.label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
}
.label .req { color: var(--dan); margin-left: 2px; }
.label .tip { font-weight: 400; color: var(--text-4); font-size: 12px; margin-left: 6px; }

.input, .textarea, .select {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-s);
  background: var(--surface);
  color: var(--text);
  font-size: 13.5px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  outline: none;
}
.input::placeholder, .textarea::placeholder { color: var(--text-4); }
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(29, 78, 92, .09);
}
.input:disabled, .textarea:disabled, .select:disabled {
  background: var(--surface-2);
  color: var(--text-3);
  cursor: not-allowed;
}
.textarea {
  height: auto;
  min-height: 92px;
  padding: 10px 12px;
  line-height: 1.6;
  resize: vertical;
}
.select {
  appearance: none;
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235c574f' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 15px;
  cursor: pointer;
}
.input-s { height: 32px; font-size: 13px; }
.input-l { height: 44px; font-size: 15px; }

.input-wrap { position: relative; }
.input-wrap .in-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  pointer-events: none;
}
.input-wrap .in-icon ~ .input { padding-left: 36px; }
.input-wrap .in-act {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  display: flex;
  align-items: center;
}
.input-wrap .in-act:hover { color: var(--ink); }

/* ---------------- combo 下拉建议选择器（替代原生 datalist） ---------------- */
/* 原生 datalist 空值点击只聚焦不弹层，必须点第二次；自绘后点一次即展开 */
.combo { position: relative; }
.combo > .input { padding-right: 34px; }
.combo-caret {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--r-s);
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
  z-index: 2;
}
.combo-caret:hover { color: var(--dan); background: var(--dan-soft); }
.combo.on .combo-caret { color: var(--dan); }
.combo-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 60;
  max-height: 232px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-m);
  box-shadow: 0 10px 28px rgba(60, 50, 35, .16);
  padding: 4px;
}
.combo-panel[hidden] { display: none; }
.combo-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: var(--r-s);
  padding: 8px 10px;
  font-size: 13.5px;
  color: var(--ink);
  cursor: pointer;
  line-height: 1.5;
}
.combo-item .ci-l { display: block; }
.combo-item .ci-d { display: block; font-size: 12px; color: var(--text-3); margin-top: 1px; }
.combo-item:hover,
.combo-item.cur { background: var(--dan-soft); color: var(--dan-deep); }
.combo-item.on { background: var(--dan-soft); color: var(--dan-deep); font-weight: 600; }
.combo-empty { padding: 12px 10px; font-size: 12.5px; color: var(--text-3); text-align: center; }
/* 弹层在页面底部时向上展开 */
.combo.up .combo-panel { top: auto; bottom: calc(100% + 4px); }

.form-err { margin-top: 5px; font-size: 12px; color: var(--dan); min-height: 0; }
.form-hint { margin-top: 5px; font-size: 12px; color: var(--text-3); }

.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 18px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }

/* 勾选 / 单选 */
.check {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-2);
  user-select: none;
}
.check input { display: none; }
.check .box {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  border: 1.4px solid var(--line-strong);
  border-radius: var(--r-xs);
  flex: none;
  position: relative;
  transition: all var(--t-fast);
  background: var(--surface);
}
.check input:checked + .box {
  background: var(--ink);
  border-color: var(--ink);
}
.check input:checked + .box::after {
  content: '';
  position: absolute;
  left: 4.5px;
  top: 1.4px;
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 1.6px 1.6px 0;
  transform: rotate(43deg);
}
.check.radio .box { border-radius: 50%; }
.check.radio input:checked + .box::after {
  left: 3.6px; top: 3.6px;
  width: 5px; height: 5px;
  border: none;
  border-radius: 50%;
  background: #fff;
  transform: none;
}
.check:hover .box { border-color: var(--ink); }

/* 选项卡片组 */
.pick-group { display: flex; flex-wrap: wrap; gap: 8px; }
.pick {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-s);
  background: var(--surface);
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
  transition: all var(--t-fast);
}
.pick:hover { border-color: var(--ink); color: var(--ink); }
.pick.on { border-color: var(--ink); background: var(--ink); color: #fff; }

/* 开关 */
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.switch input { display: none; }
.switch .track {
  width: 38px; height: 21px;
  border-radius: var(--r-pill);
  background: var(--line-strong);
  position: relative;
  transition: background var(--t-fast);
  flex: none;
}
.switch .track::after {
  content: '';
  position: absolute;
  left: 2px; top: 2px;
  width: 17px; height: 17px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--t-fast);
  box-shadow: var(--sh-1);
}
.switch input:checked + .track { background: var(--ink); }
.switch input:checked + .track::after { transform: translateX(17px); }

/* 上传 */
.up-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.up-item {
  position: relative;
  width: 96px; height: 96px;
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  overflow: hidden;
  background: var(--surface-2);
}
.up-item img { width: 100%; height: 100%; object-fit: cover; }
.up-item .del {
  position: absolute;
  right: 4px; top: 4px;
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(35, 32, 28, .62);
  color: #fff;
  border-radius: var(--r-xs);
  opacity: 0;
  transition: opacity var(--t-fast);
}
.up-item:hover .del { opacity: 1; }
.up-item .cover-tag {
  position: absolute;
  left: 0; bottom: 0;
  padding: 1px 6px;
  font-size: 10.5px;
  background: var(--ink);
  color: #fff;
}
.up-btn {
  width: 96px; height: 96px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-s);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: var(--text-3);
  font-size: 12px;
  cursor: pointer;
  background: var(--surface-2);
  transition: all var(--t-fast);
}
.up-btn:hover { border-color: var(--ink); color: var(--ink); background: var(--ink-tint); }

/* ---------------- 表格 ---------------- */
.tb-wrap { overflow-x: auto; }
.tb { width: 100%; font-size: 13px; }
.tb th {
  padding: 11px 14px;
  text-align: left;
  font-weight: 500;
  font-size: 12.5px;
  color: var(--text-2);
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.tb td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line-2);
  vertical-align: middle;
}
.tb tbody tr:hover td { background: var(--ink-tint); }
.tb tbody tr:last-child td { border-bottom: none; }
.tb .acts { display: flex; gap: 10px; align-items: center; white-space: nowrap; }
.tb .tb-media { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tb .tb-media img {
  width: 42px; height: 42px;
  object-fit: cover;
  border-radius: var(--r-xs);
  border: 1px solid var(--line);
  flex: none;
  background: var(--surface-2);
}
.tb-fix td, .tb-fix th { white-space: nowrap; }

/* ---------------- 分页 ---------------- */
.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.pager .pg {
  min-width: 32px;
  height: 32px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-xs);
  background: var(--surface);
  font-size: 13px;
  color: var(--text-2);
  transition: all var(--t-fast);
}
.pager .pg:hover:not(.on):not(.disabled) { border-color: var(--ink); color: var(--ink); }
.pager .pg.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.pager .pg.disabled { opacity: .4; pointer-events: none; }
.pager .info { font-size: 12.5px; color: var(--text-3); margin-left: 8px; }

/* ---------------- 标签页 ---------------- */
.tabs {
  display: flex;
  gap: 26px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
  overflow-x: auto;
}
.tabs .tab {
  position: relative;
  padding: 0 0 11px;
  font-size: 14px;
  color: var(--text-2);
  white-space: nowrap;
  cursor: pointer;
  transition: color var(--t-fast);
}
.tabs .tab:hover { color: var(--ink); }
.tabs .tab.on { color: var(--ink); font-weight: 600; }
.tabs .tab.on::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--ink);
}
.tabs .tab .n { font-size: 12px; color: var(--text-4); margin-left: 3px; }
.tabs .tab.on .n { color: var(--dan); }

.tabs-pill { display: flex; gap: 6px; flex-wrap: wrap; border: none; }
.tabs-pill .tab {
  padding: 5px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  font-size: 13px;
}
.tabs-pill .tab.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.tabs-pill .tab.on::after { display: none; }

/* ---------------- 空态 / 加载 ---------------- */
.empty {
  padding: 56px 20px;
  text-align: center;
  color: var(--text-3);
}
.empty .icon { color: var(--line-strong); margin-bottom: 12px; }
.empty .t { font-size: 14px; color: var(--text-2); margin-bottom: 4px; font-family: var(--f-serif); }
.empty .d { font-size: 12.5px; }
.empty .btn { margin-top: 16px; }

.skel {
  background: linear-gradient(90deg, #eeeae2 25%, #f6f3ed 37%, #eeeae2 63%);
  background-size: 400% 100%;
  animation: skel 1.3s ease infinite;
  border-radius: var(--r-xs);
}
@keyframes skel { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

.loading-line {
  height: 2px;
  background: var(--ink);
  animation: lload 1s ease-in-out infinite;
  transform-origin: left;
}
@keyframes lload { 0% { transform: scaleX(0); } 50% { transform: scaleX(.7); } 100% { transform: scaleX(1); opacity: 0; } }

.spin {
  width: 16px; height: 16px;
  border: 1.8px solid rgba(29, 78, 92, .18);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- 弹层 ---------------- */
.mask {
  position: fixed;
  inset: 0;
  background: rgba(20, 24, 26, .42);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 900;
  padding: 24px;
  animation: fadein .16s ease;
}
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

.modal {
  width: 100%;
  max-width: 460px;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--r-m);
  box-shadow: var(--sh-3);
  animation: popin .2s cubic-bezier(.2, .9, .3, 1);
  overflow: hidden;
}
@keyframes popin { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
.modal-w { max-width: 660px; }
.modal-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.modal-hd h3 { font-size: 16px; }
.modal-bd { padding: 20px; overflow-y: auto; flex: 1; }
.modal-ft {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}

/* Toast */
#toast-box {
  position: fixed;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--text);
  color: #fff;
  border-radius: var(--r-s);
  font-size: 13.5px;
  box-shadow: var(--sh-3);
  animation: tin .22s cubic-bezier(.2, .9, .3, 1);
  max-width: 80vw;
}
.toast.ok { background: #2f5f43; }
.toast.err { background: var(--dan-deep); }
@keyframes tin { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
.toast.out { animation: tout .2s ease forwards; }
@keyframes tout { to { opacity: 0; transform: translateY(-8px); } }

/* 抽屉 */
.drawer-mask {
  position: fixed; inset: 0;
  background: rgba(20, 24, 26, .4);
  z-index: 900;
  animation: fadein .16s ease;
}
.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 420px;
  max-width: 92vw;
  background: var(--surface);
  z-index: 901;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 30px rgba(35, 32, 28, .12);
  animation: din .24s cubic-bezier(.2, .9, .3, 1);
}
@keyframes din { from { transform: translateX(100%); } to { transform: none; } }

/* ---------------- 步骤条 ---------------- */
.steps { display: flex; align-items: center; gap: 0; }
.steps .step { display: flex; align-items: center; gap: 9px; color: var(--text-3); font-size: 13px; }
.steps .step .n {
  width: 24px; height: 24px;
  border: 1.4px solid var(--line-strong);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  flex: none;
}
.steps .bar { width: 46px; height: 1px; background: var(--line-strong); margin: 0 12px; }
.steps .step.on { color: var(--ink); font-weight: 600; }
.steps .step.on .n { border-color: var(--ink); background: var(--ink); color: #fff; }
.steps .step.done { color: var(--ink); }
.steps .step.done .n { border-color: var(--ink); color: var(--ink); }

/* ---------------- 时间轴 ---------------- */
.tl { position: relative; padding-left: 20px; }
.tl::before {
  content: '';
  position: absolute;
  left: 4.5px; top: 6px; bottom: 6px;
  width: 1px;
  background: var(--line);
}
.tl-item { position: relative; padding-bottom: 18px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: '';
  position: absolute;
  left: -20px; top: 5px;
  width: 9px; height: 9px;
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
  border-radius: 50%;
}
.tl-item.on::before { border-color: var(--ink); background: var(--ink); }
.tl-item .tt { font-size: 13.5px; color: var(--text); margin-bottom: 2px; }
.tl-item .td { font-size: 12px; color: var(--text-3); }

/* ---------------- 描述列表 ---------------- */
.desc { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--r-s); overflow: hidden; }
.desc .di { display: flex; padding: 11px 14px; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.desc .di:nth-child(2n) { border-left: 1px solid var(--line-2); }
.desc .di .dk { width: 92px; flex: none; color: var(--text-3); }
.desc .di .dv { flex: 1; min-width: 0; color: var(--text); word-break: break-all; }
.desc.one-col { grid-template-columns: 1fr; }
.desc.one-col .di:nth-child(2n) { border-left: none; }
@media (max-width: 700px) {
  .desc { grid-template-columns: 1fr; }
  .desc .di:nth-child(2n) { border-left: none; }
}

/* ---------------- 统计卡 ---------------- */
.stat {
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  position: relative;
  overflow: hidden;
}
.stat .sk { font-size: 12.5px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.stat .sv {
  font-family: var(--f-serif);
  font-size: 27px;
  line-height: 1.25;
  margin-top: 7px;
  color: var(--text);
  letter-spacing: -.01em;
}
.stat .sv small { font-size: 13px; color: var(--text-3); margin-left: 3px; font-family: var(--f-sans); }
.stat .se { margin-top: 5px; font-size: 12px; color: var(--text-3); }
.stat .sicon {
  position: absolute;
  right: 16px; top: 16px;
  color: var(--line-strong);
}
.stat.accent { border-left: 2px solid var(--ink); }
.stat.accent-dan { border-left: 2px solid var(--dan); }

/* ---------------- 提示条 ---------------- */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 15px;
  border-radius: var(--r-s);
  font-size: 13px;
  line-height: 1.6;
  border: 1px solid transparent;
}
.alert .icon { flex: none; margin-top: 1px; }
.alert-info { background: var(--info-soft); border-color: #d4e3e6; color: #23555e; }
.alert-warn { background: var(--warn-soft); border-color: #eeddbd; color: #7d5715; }
.alert-ok { background: var(--ok-soft); border-color: #cfe3d6; color: #2c5a3d; }
.alert-danger { background: var(--danger-soft); border-color: #eccdc6; color: #8f3323; }

/* ---------------- 面包屑 ---------------- */
.crumb { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-3); flex-wrap: wrap; }
.crumb a { color: var(--text-3); }
.crumb a:hover { color: var(--ink); }
.crumb .sep { color: var(--text-4); }
.crumb .cur { color: var(--text-2); }

/* ---------------- 协议阅读框 ---------------- */
.agreement-box {
  max-height: 300px;
  overflow-y: auto;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  background: var(--surface-2);
  font-size: 13px;
  line-height: 1.85;
  color: var(--text-2);
  white-space: pre-wrap;
}
.agreement-box h4 { font-size: 14px; margin: 14px 0 6px; color: var(--text); }
.agreement-box::-webkit-scrollbar { width: 6px; }

/* ---------------- 筛选栏 ---------------- */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  margin-bottom: 18px;
}
.filter-bar .input, .filter-bar .select { width: auto; min-width: 148px; height: 34px; font-size: 13px; }
.filter-bar .fl { font-size: 13px; color: var(--text-3); }

/* ---------------- 星级 ---------------- */
.rate { display: inline-flex; gap: 2px; color: var(--gold); }

/* ---------------- 打印 ---------------- */
@media print {
  .no-print { display: none !important; }
  body { background: #fff; }
}

/* ==========================================================================
   协议正文 / 富文本 / 文档目录
   ========================================================================== */
.rich { font-size: 14.5px; line-height: 1.9; color: var(--text-1); }
.rich h1, .rich h2, .rich h3, .rich h4 { font-family: var(--f-serif); color: var(--text-1); margin: 26px 0 10px; line-height: 1.5; }
.rich h1 { font-size: 20px; }
.rich h2 { font-size: 18px; }
.rich h3 { font-size: 16px; padding-left: 11px; border-left: 3px solid var(--dan); }
.rich h4 { font-size: 14.5px; }
.rich h5 { font-size: 14px; color: var(--text-2); }
.rich p { margin: 8px 0; }
.rich ul, .rich ol { margin: 8px 0; padding-left: 22px; }
.rich li { margin: 4px 0; }
.rich b, .rich strong { font-weight: 600; color: var(--text-1); }
.rich blockquote {
  margin: 12px 0; padding: 10px 14px;
  background: var(--surface-2); border-left: 3px solid var(--line-2);
  color: var(--text-2); border-radius: 0 var(--r-xs) var(--r-xs) 0;
}
.rich img { max-width: 100%; border-radius: var(--r-sm); display: block; margin: 10px 0; }
.rich table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 13.5px; }
.rich th, .rich td { border: 1px solid var(--line-2); padding: 8px 10px; text-align: left; }
.rich th { background: var(--surface-2); font-weight: 600; }
.rich a { color: var(--dan); text-decoration: underline; }
.rich hr { border: none; border-top: 1px solid var(--line-2); margin: 20px 0; }

.ag-body { max-width: 760px; }
.ag-lead {
  padding: 10px 14px; margin-bottom: 20px;
  background: var(--surface-2); border: 1px dashed var(--line-2);
  border-radius: var(--r-sm); font-size: 13px; color: var(--text-2);
}
.ag-tip {
  margin-top: 26px; padding: 12px 14px;
  background: var(--dan-wash); border-radius: var(--r-sm);
  font-size: 13px; color: var(--dan-deep);
}

/* 文档目录 */
.toc-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 11px; border-radius: var(--r-sm);
  color: var(--text-1); margin: 0 -11px;
  border-left: 2px solid transparent;
}
.toc-item:hover { background: var(--surface-2); }
.toc-item.on { background: var(--dan-wash); border-left-color: var(--dan); }
.toc-item > .icon { flex: none; margin-top: 2px; color: var(--text-3); }
.toc-item.on > .icon { color: var(--dan); }
.toc-item .tt { flex: 1; min-width: 0; }
.toc-item .tn { display: block; font-size: 13.5px; font-weight: 500; }
.toc-item.on .tn { color: var(--dan-deep); }
.toc-item .td { display: block; font-size: 11.5px; color: var(--text-3); line-height: 1.6; margin-top: 2px; }

.doc-hd { padding-bottom: 14px; border-bottom: 1px solid var(--line-2); margin-bottom: 18px; }
.doc-hd h1 { font-size: 23px; margin-bottom: 6px; }
.doc-ft { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line-2); }

.sticky-top { position: sticky; top: calc(var(--header-h) + 20px); }

/* ==========================================================================
   行内两步确认（替代弹窗式 confirm）
   ========================================================================== */
.btn.sc-armed {
  background: var(--danger); border-color: var(--danger); color: #fff;
  animation: scPulse 1.1s ease-in-out infinite;
}
.btn.sc-armed .sc-q { opacity: .85; font-weight: 700; margin-left: 1px; }
@keyframes scPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(196, 62, 44, .34); }
  50%      { box-shadow: 0 0 0 5px rgba(196, 62, 44, 0); }
}
.sc-cancel { margin-left: 9px; font-size: 12.5px; }

/* ==========================================================================
   详情描述列表（独立详情页统一使用）
   ========================================================================== */
.desc { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
.desc.one-col { grid-template-columns: 1fr; }
.desc.three-col { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 720px) { .desc, .desc.three-col { grid-template-columns: 1fr; } }
.desc .di {
  display: flex; gap: 10px; padding: 9px 0;
  border-bottom: 1px dashed var(--line-2); font-size: 13.5px; min-width: 0;
}
.desc .di .dk { flex: none; width: 84px; color: var(--text-3); }
.desc .di .dv { flex: 1; min-width: 0; color: var(--text-1); word-break: break-word; }
.desc.one-col .di .dk { width: 104px; }
.desc .di.wide { grid-column: 1 / -1; }
.desc .di.wide .dk { width: 84px; }

.detail-block { margin-top: 22px; }
.detail-block > .label { margin-bottom: 8px; }

/* 图片 / 证照网格 */
.cert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.cert-item { border: 1px solid var(--line-2); border-radius: var(--r-sm); overflow: hidden; background: var(--surface-2); }
.cert-item .ct {
  font-size: 11.5px; color: var(--text-3); padding: 5px 9px;
  border-bottom: 1px solid var(--line-2); background: var(--surface);
}
.cert-item img { display: block; width: 100%; height: 116px; object-fit: cover; background: var(--surface-2); }

/* 步骤条（审核 / 入驻流程） */
.steps { display: flex; align-items: center; }
.steps .step { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-3); white-space: nowrap; }
.steps .step .n {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1.4px solid var(--line-2); font-size: 12px; color: var(--text-3);
}
.steps .step.on { color: var(--dan-deep); font-weight: 500; }
.steps .step.on .n { background: var(--dan); border-color: var(--dan); color: #fff; }
.steps .step.done .n { background: var(--ok); border-color: var(--ok); color: #fff; }
.steps .bar { flex: 1; height: 1px; background: var(--line-2); margin: 0 12px; min-width: 20px; }
