/* ==========================================================================
   CASA罗湖口岸店 · 入户保洁预约  设计系统
   视觉基调：亚朵（暖木质感、自然米色）× 全季（克制留白、低饱和）。
   关键词：中高端、安静、可信赖。避免任何高饱和与硬边框。
   ========================================================================== */
:root {
  --bg: #f5f1ea;
  --bg-soft: #faf8f4;
  --card: #ffffff;
  --ink: #2c2724;
  --ink-2: #6e6559;
  --ink-3: #a8a093;
  --line: #ede6da;
  --line-strong: #ded4c4;

  --brand: #6b5744;
  --brand-deep: #4e3f31;
  --brand-soft: #efe8dd;
  --gold: #b99564;
  --gold-soft: #e9dcc6;
  --green: #3f7d6b;
  --danger: #b4553f;

  --radius-xl: 22px;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 2px 18px rgba(90, 74, 58, 0.07);
  --shadow-lg: 0 12px 40px rgba(78, 63, 49, 0.14);
  --max-w: 430px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "PingFang SC", "HarmonyOS Sans SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }

/* ---------------------------------------------------------------- 手机外框 */
.shell {
  max-width: var(--max-w);
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  padding-bottom: 142px;
}
@media (min-width: 900px) {
  body { background: #e9e3d9; }
  .shell {
    min-height: 100vh;
    box-shadow: 0 0 0 1px rgba(78, 63, 49, .06), 0 30px 70px rgba(78, 63, 49, .16);
  }
}

/* ---------------------------------------------------------------- 顶部 */
.hero {
  position: relative;
  background: linear-gradient(150deg, #6b5744 0%, #7d6750 45%, #8e765a 100%);
  color: #fff;
  padding: 26px 22px 58px;
  border-radius: 0 0 26px 26px;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 88% 12%, rgba(233, 220, 198, .34), transparent 46%),
    radial-gradient(circle at 8% 92%, rgba(255, 255, 255, .12), transparent 42%);
  pointer-events: none;
}
.hero-top { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 1; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .3);
  display: grid; place-items: center;
  font-size: 15px; font-weight: 600; letter-spacing: .5px;
  backdrop-filter: blur(4px);
}
.brand-name { font-size: 21px; font-weight: 700; letter-spacing: 1.5px; }
.brand-sub { font-size: 12px; letter-spacing: 3px; opacity: .62; margin-top: 2px; }
.hero-link {
  color: rgba(255, 255, 255, .82);
  font-size: 12px;
  letter-spacing: 1px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .28);
  transition: .2s;
}
.hero-link:hover { background: rgba(255, 255, 255, .14); }

.hero-title { position: relative; z-index: 1; margin-top: 22px; }
.hero-title h1 { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: 1.5px; }
.hero-title p { margin: 7px 0 0; font-size: 12.5px; letter-spacing: 1px; color: rgba(255, 255, 255, .7); }

/* 服务标准前置展示（需求 2.3） */
.std-card {
  position: relative;
  z-index: 2;
  margin: -42px 16px 0;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 13px;
}
.std-badge {
  flex: none;
  width: 42px; height: 42px; border-radius: 13px;
  background: linear-gradient(145deg, #f2ebdf, #e5d9c4);
  display: grid; place-items: center;
  font-size: 19px;
}
.std-main { font-size: 14.5px; font-weight: 600; letter-spacing: .4px; }
.std-sub { font-size: 11.5px; color: var(--ink-3); margin-top: 3px; letter-spacing: .3px; }

/* ---------------------------------------------------------------- 卡片 */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 12px 16px;
  padding: 17px 16px;
}
.card-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 14px;
}
.card-title { font-size: 15px; font-weight: 600; letter-spacing: 1px; }
.card-title .dot {
  display: inline-block; width: 4px; height: 4px; border-radius: 50%;
  background: var(--gold); vertical-align: middle; margin-right: 7px; transform: translateY(-2px);
}
.card-hint { font-size: 11.5px; color: var(--ink-3); }

/* ---------------------------------------------------------------- 日期条 */
.dates { display: flex; gap: 9px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; }
.dates::-webkit-scrollbar { display: none; }
.date-chip {
  flex: none;
  width: 60px;
  padding: 10px 0 9px;
  border-radius: 14px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  text-align: center;
  transition: .18s;
}
.date-chip .dw { font-size: 11px; color: var(--ink-3); letter-spacing: .5px; }
.date-chip .dd { font-size: 16px; font-weight: 600; margin-top: 2px; letter-spacing: .5px; }
.date-chip .dm { font-size: 10px; color: var(--ink-3); }
.date-chip.on {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 6px 16px rgba(107, 87, 68, .28);
}
.date-chip.on .dw, .date-chip.on .dm { color: rgba(255, 255, 255, .72); }
.date-chip.off { opacity: .42; }
.date-chip.off .dd { text-decoration: line-through; text-decoration-color: var(--ink-3); }

/* ---------------------------------------------------------------- 时段 */
.slots { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.slot {
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  padding: 11px 12px;
  text-align: left;
  transition: .18s;
  position: relative;
}
.slot .t { font-size: 14px; font-weight: 600; letter-spacing: .3px; }
.slot .s { font-size: 11px; color: var(--ink-3); margin-top: 3px; }
.slot.on { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 6px 16px rgba(107, 87, 68, .26); }
.slot.on .s { color: rgba(255, 255, 255, .74); }
.slot:disabled { opacity: .5; cursor: not-allowed; background: #f2efe9; }
.slot:disabled .t { color: var(--ink-3); font-weight: 500; }
.slot.full { border-style: dashed; }

/* ---------------------------------------------------------------- 表单 */
.field { margin-bottom: 13px; }
.field:last-child { margin-bottom: 0; }
.label { font-size: 12.5px; color: var(--ink-2); margin-bottom: 7px; letter-spacing: .4px; }
.label .req { color: var(--danger); margin-left: 3px; }
.input, .textarea, select.input {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  background: #fff;
  outline: none;
  transition: .18s;
}
.input::placeholder, .textarea::placeholder { color: #bdb4a6; }
.input:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(107, 87, 68, .08); }
.textarea { resize: vertical; min-height: 62px; }
.hint { font-size: 11.5px; color: var(--ink-3); margin-top: 6px; line-height: 1.55; }

/* ---------------------------------------------------------------- 单选/开关 */
.opts { display: grid; gap: 9px; }
.opt {
  display: flex; align-items: center; gap: 11px;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 12px 13px;
  background: var(--bg-soft);
  transition: .18s;
  text-align: left;
  width: 100%;
}
.opt.on { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(107, 87, 68, .07); }
.radio {
  flex: none; width: 18px; height: 18px; border-radius: 50%;
  border: 1.5px solid var(--line-strong); display: grid; place-items: center; transition: .18s;
}
.opt.on .radio { border-color: var(--brand); }
.opt.on .radio::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--brand); }
.opt-body { flex: 1; }
.opt-t { font-size: 14px; font-weight: 500; letter-spacing: .4px; }
.opt-d { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.pill-tag {
  font-size: 10.5px; color: var(--brand);
  background: var(--brand-soft);
  border-radius: 999px; padding: 2px 8px; letter-spacing: .5px;
}

.switch {
  flex: none; width: 46px; height: 27px; border-radius: 999px;
  background: #dfd8cb; position: relative; transition: .22s;
}
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 21px; height: 21px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .18); transition: .22s;
}
.switch.on { background: var(--green); }
.switch.on::after { transform: translateX(19px); }

.chips { display: flex; flex-wrap: wrap; gap: 9px; }
.chip {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  color: var(--ink-2);
  background: #fff;
  transition: .18s;
}
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 4px 12px rgba(107, 87, 68, .22); }
.chip:disabled { opacity: .4; cursor: not-allowed; }

/* ---------------------------------------------------------------- 授权/密码面板 */
.panel {
  margin-top: 12px;
  border-radius: 14px;
  padding: 14px;
  background: linear-gradient(180deg, #f7f3ec, #f2ece2);
  border: 1px solid var(--line);
}
.panel-title { font-size: 12.5px; font-weight: 600; letter-spacing: .8px; color: var(--brand-deep); margin-bottom: 10px; }
.panel-warn {
  display: flex; gap: 8px;
  font-size: 11.5px; color: #8a6a3f; line-height: 1.6;
  background: #fdf7ea; border: 1px solid #f0e2c6; border-radius: 10px; padding: 9px 11px; margin-top: 10px;
}
.pwd-box {
  display: flex; align-items: center; justify-content: space-between;
  background: #fff; border: 1px dashed var(--line-strong); border-radius: 12px; padding: 12px 14px;
}
.pwd-val { font-size: 21px; font-weight: 600; letter-spacing: 6px; color: var(--brand-deep); font-variant-numeric: tabular-nums; }
.pwd-renew { font-size: 12px; color: var(--brand); letter-spacing: .5px; }

/* ---------------------------------------------------------------- 底部操作栏（固定在页面末尾，非浮动） */
.footer-bar {
  position: static;
  max-width: var(--max-w);
  margin: 20px auto calc(64px + env(safe-area-inset-bottom));
  padding: 18px 16px 0;
  border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px;
}
.price-info { flex: 1; }
.price-info .p1 { font-size: 12px; color: var(--ink-3); }
.price-info .p2 { font-size: 13px; font-weight: 600; letter-spacing: .3px; }
.btn {
  border-radius: 14px;
  padding: 13px 26px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 2px;
  transition: .2s;
}
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 22px rgba(107, 87, 68, .28); }
.btn-primary:hover { background: var(--brand-deep); }
.btn-primary:disabled { background: #cfc7bb; box-shadow: none; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-ghost {
  border: 1px solid var(--line-strong); color: var(--ink-2); background: #fff;
}
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-sm { padding: 8px 15px; font-size: 12.5px; letter-spacing: 1px; border-radius: 10px; }
.btn-danger { border: 1px solid #e8d3cb; color: var(--danger); background: #fff; }

/* ---------------------------------------------------------------- 底部导航 */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0;
  max-width: var(--max-w); margin: 0 auto;
  height: 56px;
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  display: flex;
  z-index: 50;
}
.tab {
  flex: 1; text-align: center; padding: 7px 0 0;
  font-size: 11.5px; color: var(--ink-3); letter-spacing: 1px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.tab .ic { font-size: 18px; line-height: 1; filter: grayscale(1) opacity(.5); transition: .2s; }
.tab.on { color: var(--brand); font-weight: 600; }
.tab.on .ic { filter: none; }

/* ---------------------------------------------------------------- 订单卡 */
.order {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 12px 16px;
  overflow: hidden;
}
.order-top {
  padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px dashed var(--line);
}
.order-no { font-size: 11.5px; color: var(--ink-3); letter-spacing: .5px; }
.order-when { font-size: 15px; font-weight: 600; letter-spacing: .6px; margin-top: 3px; }
.tag {
  font-size: 11.5px; padding: 4px 11px; border-radius: 999px; letter-spacing: .8px;
  border: 1px solid currentColor; white-space: nowrap;
}
.order-body { padding: 13px 16px; display: grid; gap: 9px; }
.row { display: flex; font-size: 13px; }
.row .k { color: var(--ink-3); width: 76px; flex: none; letter-spacing: .3px; }
.row .v { flex: 1; color: var(--ink); }
.order-actions {
  padding: 12px 16px; display: flex; gap: 10px; justify-content: flex-end;
  background: var(--bg-soft); border-top: 1px solid var(--line);
}
.order-tip {
  padding: 9px 16px 12px; font-size: 11.5px; line-height: 1.65;
  color: var(--ink-3); background: var(--bg-soft);
  border-top: 1px dashed var(--line);
}
.timeline { margin-top: 4px; }
.tl-item { display: flex; gap: 10px; font-size: 12px; color: var(--ink-2); }
.tl-item + .tl-item { margin-top: 8px; }
.tl-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); margin-top: 7px; }

/* ---------------------------------------------------------------- 弹层 */
.mask {
  position: fixed; inset: 0; background: rgba(44, 39, 36, .45);
  backdrop-filter: blur(2px);
  z-index: 100; display: flex; align-items: flex-end; justify-content: center;
  animation: fade .2s ease;
}
.mask.center { align-items: center; }
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
.sheet {
  background: var(--card);
  width: 100%; max-width: var(--max-w);
  border-radius: 24px 24px 0 0;
  padding: 20px 18px calc(20px + env(safe-area-inset-bottom));
  max-height: 88vh; overflow-y: auto;
  animation: slideUp .26s cubic-bezier(.22, .9, .3, 1);
}
@keyframes slideUp { from { transform: translateY(30px); opacity: .6 } to { transform: none; opacity: 1 } }
.sheet-title { font-size: 16px; font-weight: 600; letter-spacing: 1px; text-align: center; }
.sheet-sub { font-size: 12px; color: var(--ink-3); text-align: center; margin: 6px 0 16px; }
.sheet-actions { display: flex; gap: 11px; margin-top: 18px; }
.sheet-actions .btn { flex: 1; text-align: center; }

.empty { text-align: center; padding: 54px 24px; color: var(--ink-3); }
.empty .e-ic { font-size: 40px; opacity: .5; }
.empty p { font-size: 13px; margin: 10px 0 0; letter-spacing: .5px; }

.toast {
  position: fixed; left: 50%; top: 42%; transform: translate(-50%, -50%);
  background: rgba(44, 39, 36, .9); color: #fff;
  padding: 12px 20px; border-radius: 12px; font-size: 13.5px;
  max-width: 76%; text-align: center; z-index: 200; letter-spacing: .4px;
  animation: fade .18s;
}

.sec-note {
  font-size: 11.5px; color: var(--ink-3);
  padding: 0 6px; margin: -4px 0 2px; line-height: 1.6;
}
.hidden { display: none !important; }
.spin { display: inline-block; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg) } }
