:root {
  /* 携程商旅品牌色系 */
  --blue: #0577f2;
  --blue-dark: #0057c7;
  --blue-light: #e8f2ff;
  --blue-grad: linear-gradient(135deg, #1788ff 0%, #0577f2 55%, #0057c7 100%);
  --orange: #ff7d23;
  --red: #f5222d;
  --green: #00b070;
  --ink: #182230;
  --sub: #7a8798;
  --line: #eef1f6;
  --bg: #f2f5f9;
  --card: #ffffff;
  --radius: 12px;
  --shadow: 0 4px 18px rgba(5, 55, 120, 0.07);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #dfe5ee;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
}

button, input, select, textarea { font-family: inherit; font-size: 14px; }

.phone {
  position: relative;
  width: min(100%, 430px);
  height: 100vh;
  margin: 0 auto;
  background: var(--bg);
  overflow: hidden;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.14);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 54px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  color: #fff;
  background: var(--blue-grad);
  box-shadow: 0 2px 10px rgba(5, 87, 199, 0.22);
}

.topbar .back {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 20px;
  line-height: 30px;
  cursor: pointer;
}

.topbar h1 {
  flex: 1;
  margin: 0;
  font-size: 17px;
  font-weight: 600;
}

.topbar .contract-btn {
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: transparent;
  color: #fff;
  border-radius: 16px;
  padding: 5px 10px;
  font-size: 12px;
  cursor: pointer;
}

.app-main {
  height: calc(100% - 56px - 62px);
  overflow-y: auto;
  padding: 12px 12px 18px;
  -webkit-overflow-scrolling: touch;
}

.tabbar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 62px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #fff;
  border-top: 1px solid var(--line);
  z-index: 21;
}

.tabbar button {
  border: 0;
  background: transparent;
  color: var(--sub);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  font-size: 11px;
}

.tabbar button.active { color: var(--blue); font-weight: 600; }
.tabbar svg { width: 22px; height: 22px; }

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
  margin-bottom: 12px;
}

.hero {
  background: linear-gradient(135deg, #2577e3, #4a9cf7);
  color: #fff;
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 12px;
  box-shadow: 0 10px 24px rgba(37, 119, 227, 0.28);
}

.hero h2 { margin: 0 0 6px; font-size: 20px; }
.hero p { margin: 0; opacity: 0.88; line-height: 1.6; }
.hero-row { display: flex; gap: 8px; margin-top: 14px; }
.hero-chip {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  padding: 5px 10px;
  font-size: 12px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 14px 2px 8px;
  font-weight: 600;
}
.section-title small { color: var(--sub); font-weight: 400; }

.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.quick-item {
  background: #fff;
  border: 0;
  border-radius: 12px;
  padding: 12px 4px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  cursor: pointer;
}
.quick-item .qicon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--blue-light);
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.quick-item span { font-size: 12px; }

.kv { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--sub); }
.kv .v { text-align: right; font-weight: 500; }

.badge {
  display: inline-block;
  border-radius: 20px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 500;
}
.badge.ok { background: #e8f8ef; color: var(--green); }
.badge.warn { background: #fff3e6; color: var(--orange); }
.badge.info { background: var(--blue-light); color: var(--blue); }
.badge.gray { background: #f1f2f4; color: var(--sub); }

.form-row { margin-bottom: 12px; }
.form-row label { display: block; color: var(--sub); margin-bottom: 6px; font-size: 12px; }
.form-row input, .form-row select, .form-row textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 11px;
  background: #fff;
  color: var(--ink);
  outline: none;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { border-color: var(--blue); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.btn {
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 12px;
  background: var(--blue);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}
.btn:active { opacity: 0.85; }
.btn.ghost { background: var(--blue-light); color: var(--blue); }
.btn.orange { background: var(--orange); }
.btn.gray { background: #f1f2f4; color: var(--sub); }
.btn.small { width: auto; padding: 7px 12px; font-size: 12px; }
.btn-row { display: flex; gap: 10px; }

.notice {
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff8ec;
  color: #9a6200;
  font-size: 12px;
  line-height: 1.6;
  margin-bottom: 12px;
}
.notice.blue { background: var(--blue-light); color: var(--blue-dark); }
.notice.red { background: #fff0ef; color: var(--red); }

.searchbar { display: flex; gap: 8px; margin-bottom: 10px; }
.searchbar input {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 9px 14px;
  outline: none;
}
.searchbar input:focus { border-color: var(--blue); }

.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 10px; }
.chip {
  flex: none;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--sub);
  border-radius: 18px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 12px;
}
.chip.active { background: var(--blue); border-color: var(--blue); color: #fff; }

.hotel-card { background: #fff; border-radius: var(--radius); padding: 12px; margin-bottom: 10px; box-shadow: var(--shadow); }
.hotel-head { display: flex; gap: 10px; }
.hotel-photo {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  background: linear-gradient(135deg, #7ab4f8, #2577e3);
}
.hotel-meta { flex: 1; min-width: 0; }
.hotel-name { font-size: 15px; font-weight: 600; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hotel-addr { color: var(--sub); font-size: 12px; line-height: 1.5; }
.hotel-tags { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px; }
.hotel-foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.price { color: var(--red); font-size: 19px; font-weight: 700; }
.price small { font-size: 11px; font-weight: 400; color: var(--sub); }
.split { font-size: 11px; color: var(--sub); text-align: right; line-height: 1.5; }

.quote {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
}
.quote-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.quote-name { font-weight: 600; }
.quote-plan { color: var(--sub); font-size: 12px; margin: 4px 0 8px; }
.quote-lines { color: var(--sub); font-size: 12px; line-height: 1.7; }
.quote-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }

.timeline { position: relative; padding-left: 16px; }
.timeline::before { content: ""; position: absolute; left: 4px; top: 5px; bottom: 5px; width: 2px; background: var(--line); }
.timeline-item { position: relative; padding: 0 0 14px 10px; }
.timeline-item::before { content: ""; position: absolute; left: -15px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--blue); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--blue); }
.timeline-item p { margin: 0; color: var(--sub); font-size: 12px; }

.code-box {
  background: #111827;
  color: #d1e7ff;
  border-radius: 10px;
  padding: 12px;
  font-family: Consolas, Monaco, monospace;
  font-size: 11px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 320px;
  overflow: auto;
}

.drawer-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 40;
  display: none;
}
.drawer-mask.show { display: block; }
.drawer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 82%;
  background: #fff;
  border-radius: 18px 18px 0 0;
  z-index: 41;
  transform: translateY(100%);
  transition: transform 0.22s ease;
  overflow: hidden;
}
.drawer.show { transform: translateY(0); }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); font-weight: 600; }
.drawer-body { padding: 14px 16px 24px; overflow-y: auto; max-height: calc(82vh - 52px); }

.toast {
  position: absolute;
  left: 50%;
  bottom: 84px;
  transform: translateX(-50%);
  background: rgba(31, 35, 41, 0.9);
  color: #fff;
  padding: 9px 16px;
  border-radius: 20px;
  font-size: 12px;
  z-index: 60;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
  white-space: nowrap;
}
.toast.show { opacity: 1; }

.empty { text-align: center; color: var(--sub); padding: 38px 10px; line-height: 1.8; }
.empty .big { font-size: 30px; color: #c9d2df; margin-bottom: 8px; }

.flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}
.flow-step {
  background: #fff;
  border-radius: 10px;
  padding: 9px 4px;
  text-align: center;
  color: var(--sub);
  font-size: 11px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}
.flow-step.done { color: var(--green); }
.flow-step.active { color: var(--blue); font-weight: 600; }
.flow-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--line);
  color: var(--sub);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}
.flow-step.done .flow-num { background: #e8f8ef; color: var(--green); }
.flow-step.active .flow-num { background: var(--blue-light); color: var(--blue); }

.form-group-title {
  margin: 14px 0 8px;
  padding-left: 9px;
  border-left: 3px solid var(--blue);
  font-weight: 600;
  color: var(--ink);
}
.form-group-title:first-child { margin-top: 0; }
.form-row.full { grid-column: 1 / -1; }
.req { color: var(--red); margin-left: 3px; }
.field-hint { color: var(--sub); font-size: 10px; margin-top: 4px; line-height: 1.4; }
.form-row input[readonly], .form-row textarea[readonly] {
  background: #f7f8fa;
  color: var(--sub);
}
.check-group { display: flex; flex-wrap: wrap; gap: 6px; }
.check-pill {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 6px 10px;
  font-size: 12px;
  color: var(--sub);
  background: #fff;
  cursor: pointer;
}
.check-pill input { width: auto; margin-right: 4px; }
.check-pill:has(input:checked) {
  border-color: var(--blue);
  background: var(--blue-light);
  color: var(--blue);
}

@media (max-width: 360px) {
  .quick-grid { grid-template-columns: repeat(2, 1fr); }
  .hotel-photo { width: 60px; height: 60px; }
}
