/* ==========================================================================
   上门按摩预约平台 · 全局样式（原生 CSS，无依赖）
   设计语言：主色 #16a05d，统一圆角 / 间距 / 交互反馈，移动优先并适配桌面
   ========================================================================== */

:root {
  /* 品牌色 */
  --brand: #16a05d;
  --brand-dark: #128a4f;
  --brand-darker: #0c6f3f;
  --brand-soft: #e8f7ef;
  --brand-line: #cdeadd;
  /* 顶栏 / 头图统一渐变，全站只此一处定义，避免各页色值漂移 */
  --brand-grad: linear-gradient(165deg, #16a05d 0%, #0d7a45 100%);
  --star: #ffb02e;
  --orange: #ff8f1f;
  --orange-dark: #ef8212;
  --orange-soft: #fff4e5;
  --orange-text: #c77700;
  --red: #e5484d;
  --red-dark: #cf3b40;
  --red-soft: #ffecec;
  --blue: #2f7fe0;
  --blue-soft: #eaf2fd;
  /* 警示色（管理端登录锁定倒计时、退改时效提醒等真正的「警示」场景） */
  --warn-bg: #fff8e8;
  --warn-line: #ffe1ad;
  --warn-text: #8a5b00;
  --warn-strong: #a86400;
  --ink: #1a1a1a;
  --ink-2: #555;
  --ink-3: #999;
  --line: #f0f0f0;
  --line-2: #e6e8eb;
  /* 单选圈 / 未选中控件描边，统一取色，避免各页灰值不一致 */
  --line-3: #d6dade;
  --line-soft: #fafbfc;
  --ink-disabled: #c8ccd0;
  --bg: #f7f8fa;
  --card: #fff;

  /* 统一圆角 */
  --radius-xs: 8px;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 18px;
  --radius-pill: 999px;

  /* 统一间距 */
  --gap-xs: 6px;
  --gap-sm: 8px;
  --gap: 12px;
  --gap-lg: 16px;
  --pad: 16px;

  /* 阴影与聚焦 */
  --shadow: 0 1px 3px rgba(0, 0, 0, .06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, .07);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, .12);
  --focus-ring: 0 0 0 3px rgba(22, 160, 93, .18);
  --focus-ring-danger: 0 0 0 3px rgba(229, 72, 77, .18);
  --t: .18s cubic-bezier(.2, .7, .3, 1);

  --maxw: 560px;
  --maxw-doc: 820px;
  /* 底部 tab 栏高度 + 手机安全区，正文底部统一按此留白，避免内容被遮挡 */
  --tabbar-h: 58px;
  --safe-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + 14px);
}

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

html, body { height: 100%; }

body {
  font: 15px/1.6 -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

/* 键盘可达性：统一聚焦环 */
:focus-visible { outline: none; }
a:focus-visible, button:focus-visible, .chip:focus-visible,
.seg span:focus-visible, .seg button:focus-visible, .clickable:focus-visible {
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-xs);
}

/* ---------------------------------------------------------------- 图标 */

.ic {
  width: 1em; height: 1em; display: inline-block; vertical-align: -.14em;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; flex: none;
}
.ic.lg { width: 30px; height: 30px; stroke-width: 1.6; }
.ic.xl { width: 44px; height: 44px; stroke-width: 1.4; }

/* ---------------------------------------------------------------- 品牌 */

.brand { display: inline-flex; align-items: center; gap: 9px; min-width: 0; color: inherit; }
.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }

/* 品牌标识：渐变底色圆角方块 + 白色图形（不使用 emoji） */
.brand-mark {
  width: 32px; height: 32px; flex: none; position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9px;
  background: linear-gradient(145deg, #2fd07f 0%, #16a05d 48%, #0a6238 100%);
  box-shadow: 0 2px 8px rgba(11, 107, 61, .32), inset 0 1px 0 rgba(255, 255, 255, .28);
}
.brand-glyph {
  width: 68%; height: 68%; display: block;
  fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round;
}
.brand-name {
  font-weight: 800; letter-spacing: .6px; font-size: 17px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.brand-sub { font-size: 11px; font-weight: 400; opacity: .82; letter-spacing: 0; }
.brand.lg .brand-mark { width: 56px; height: 56px; border-radius: 16px; }
.brand.lg .brand-glyph { stroke-width: 1.9; }
.brand.lg .brand-name { font-size: 27px; letter-spacing: 2px; }
.brand.sm .brand-mark { width: 28px; height: 28px; border-radius: 8px; }
.brand.sm .brand-name { font-size: 15px; }
.brand.xs .brand-mark { width: 24px; height: 24px; border-radius: 7px; }
.brand.xs .brand-name { font-size: 14px; }
.brand.stacked { flex-direction: column; gap: 12px; }
.brand.stacked .brand-text { align-items: center; text-align: center; gap: 3px; }
.brand.stacked .brand-sub { font-size: 12.5px; }

/* ---------------------------------------------------------------- 顶栏 */

.bar {
  position: sticky; top: 0; z-index: 50;
  background: var(--brand); color: #fff;
  padding: 12px 16px;
  font-weight: 700; font-size: 16px;
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px;
  box-shadow: 0 1px 6px rgba(12, 111, 63, .16);
}
.bar .bar-sub { font-size: 11.5px; font-weight: 400; opacity: .85; letter-spacing: 0; }
.bar a, .bar button { color: #fff; font-size: 13px; font-weight: 500; opacity: .95; transition: opacity var(--t); }
.bar a:hover, .bar button:hover { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }
.bar .bar-actions { display: flex; gap: 12px; align-items: center; }
.bar.dark { background: #1f2733; box-shadow: 0 1px 6px rgba(0, 0, 0, .2); }
.bar.blue { background: var(--blue); box-shadow: 0 1px 6px rgba(20, 80, 160, .2); }
.bar .brand-mark { box-shadow: 0 0 0 2px rgba(255, 255, 255, .5), 0 2px 6px rgba(0, 0, 0, .18); }
.bar .brand-name { font-size: 16px; }

/* ---------------------------------------------------------------- 布局 */

.wrap { max-width: var(--maxw); margin: 0 auto; padding: var(--pad); padding-bottom: 24px; }
.wrap.has-tabbar { padding-bottom: var(--safe-bottom); }
.wrap-wide { max-width: 1200px; }
.wrap-doc { max-width: var(--maxw-doc); }

.card {
  background: var(--card); border-radius: var(--radius);
  padding: var(--pad); margin-bottom: var(--gap); box-shadow: var(--shadow);
  border: 1px solid rgba(0, 0, 0, .015);
}
.card h3 {
  margin-bottom: var(--gap); font-size: 16px;
  display: flex; align-items: center; justify-content: space-between; gap: var(--gap-sm);
}
.card h3 .more { font-size: 12px; color: var(--ink-3); font-weight: 400; }
.card.tight { padding: 10px var(--pad); }
.card.center { text-align: center; }
.card.flush { padding: 0; overflow: hidden; }
.card.flat { box-shadow: none; border: 1px solid var(--line-2); }

.grid { display: grid; gap: var(--gap); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--line); gap: 10px;
}
.row:last-child { border-bottom: none; }
.row.tight { padding: 7px 0; }
.clickable { cursor: pointer; display: flex; text-decoration: none; color: inherit; transition: background var(--t); }
.clickable:hover { background: var(--line-soft); }
.clickable:active { background: #f4f6f8; }

.flex { display: flex; align-items: center; gap: var(--gap-sm); }
.flex-1 { flex: 1; min-width: 0; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.col { display: flex; flex-direction: column; gap: 4px; }
.wrap-gap { display: flex; gap: var(--gap-sm); flex-wrap: wrap; }
.mt { margin-top: 10px; }
.mt-lg { margin-top: var(--gap-lg); }
.mb { margin-bottom: 10px; }
.hidden { display: none !important; }
.text-c { text-align: center; }
.text-r { text-align: right; }

/* ---------------------------------------------------------------- 文字 */

.muted { color: var(--ink-3); font-size: 13px; }
.muted-sm { color: var(--ink-3); font-size: 12px; }
.price { color: var(--brand); font-weight: 700; }
.price-lg { color: var(--brand); font-weight: 800; font-size: 26px; }
.strong { font-weight: 700; }
.big { font-size: 22px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.line-2 {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.strike { text-decoration: line-through; color: var(--ink-3); font-size: 12px; }

/* ---------------------------------------------------------------- 按钮 */

.btn {
  --btn-bg: var(--brand);
  --btn-bg-h: var(--brand-dark);
  --btn-fg: #fff;
  --btn-bd: transparent;
  display: block; width: 100%;
  background: var(--btn-bg); color: var(--btn-fg);
  border: 1px solid var(--btn-bd);
  text-align: center; padding: 13px; border-radius: var(--radius-sm);
  font-weight: 700; font-size: 15px; text-decoration: none;
  margin-top: var(--gap); line-height: 1.35;
  transition: background var(--t), transform .1s ease, box-shadow var(--t), color var(--t), border-color var(--t);
  box-shadow: 0 1px 2px rgba(12, 111, 63, .18);
  user-select: none;
}
.btn:hover { background: var(--btn-bg-h); box-shadow: 0 5px 16px rgba(12, 111, 63, .22); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.985); box-shadow: 0 1px 2px rgba(12, 111, 63, .2); }
.btn:focus-visible { box-shadow: var(--focus-ring); }
.btn.gh { --btn-bg: #fff; --btn-bg-h: var(--brand-soft); --btn-fg: var(--brand); --btn-bd: var(--brand); }
.btn.gray { --btn-bg: #fff; --btn-bg-h: #f3f5f7; --btn-fg: var(--ink-2); --btn-bd: var(--line-2); box-shadow: none; }
.btn.gray:hover { box-shadow: 0 4px 12px rgba(0, 0, 0, .07); }
.btn.danger { --btn-bg: var(--red); --btn-bg-h: var(--red-dark); box-shadow: 0 1px 2px rgba(160, 30, 34, .2); }
.btn.orange { --btn-bg: var(--orange); --btn-bg-h: var(--orange-dark); box-shadow: 0 1px 2px rgba(180, 100, 0, .2); }
.btn.dark { --btn-bg: #1f2733; --btn-bg-h: #2c3644; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.btn[disabled], .btn.disabled {
  --btn-bg: #d6dbdf; --btn-bg-h: #d6dbdf; --btn-fg: #fff; --btn-bd: transparent;
  background: var(--btn-bg); color: var(--btn-fg); border-color: var(--btn-bd);
  opacity: 1; pointer-events: none; cursor: not-allowed;
  box-shadow: none; transform: none;
}
.btn.sm { width: auto; display: inline-block; padding: 7px 14px; font-size: 13px; margin: 0; border-radius: var(--radius-xs); }
.btn.xs { width: auto; display: inline-block; padding: 4px 10px; font-size: 12px; margin: 0; border-radius: var(--radius-xs); font-weight: 600; }
.btn.block { width: 100%; }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { margin-top: var(--gap); }

/* ---------------------------------------------------------------- 标签 */

.tag {
  display: inline-block; background: var(--brand-soft); color: var(--brand);
  padding: 2px 8px; border-radius: var(--radius-xs); font-size: 12px; white-space: nowrap;
  font-weight: 500;
}
.tag.o { background: var(--orange-soft); color: var(--orange-text); }
.tag.gray { background: #f2f3f5; color: var(--ink-2); }
.tag.red { background: var(--red-soft); color: var(--red); }
.tag.blue { background: var(--blue-soft); color: var(--blue); }
.tag.line { background: #fff; border: 1px solid var(--brand-line); }
.tag.big { padding: 4px 11px; font-size: 13px; }

/* 在线状态点 */
.dot { width: 7px; height: 7px; border-radius: 50%; background: #c9ced4; display: inline-block; vertical-align: 1px; margin-right: 5px; }
.dot.on { background: var(--brand); box-shadow: 0 0 0 3px rgba(22, 160, 93, .16); }
.dot.off { background: #c9ced4; }

/* ---------------------------------------------------------------- 筛选 */

.chips { display: flex; gap: var(--gap-sm); flex-wrap: wrap; margin-top: var(--gap-xs); }
.chip {
  border: 1px solid var(--line-2); border-radius: var(--radius-pill); padding: 5px 12px;
  font-size: 13px; color: var(--ink-2); background: #fff; cursor: pointer;
  white-space: nowrap; transition: all var(--t);
}
.chip:hover { border-color: var(--brand-line); color: var(--brand); background: var(--brand-soft); }
.chip:active { transform: scale(.96); }
.chip.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.chip.on:hover { background: var(--brand-dark); color: #fff; }

.seg { display: flex; gap: var(--gap-sm); margin-top: var(--gap-xs); }
.seg span, .seg button {
  flex: 1; text-align: center; border: 1px solid var(--line-2); border-radius: var(--radius-xs);
  padding: 8px 4px; font-size: 13px; color: var(--ink-2); background: #fff;
  cursor: pointer; white-space: nowrap; transition: all var(--t);
}
.seg span:hover, .seg button:hover { border-color: var(--brand-line); color: var(--brand); }
.seg span:active, .seg button:active { transform: scale(.98); }
.seg span.on, .seg button.on {
  background: var(--brand-soft); color: var(--brand); border-color: var(--brand); font-weight: 700;
}
.seg.scroll { overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.seg.scroll span, .seg.scroll button { flex: 0 0 auto; padding: 8px 12px; }
.seg.scroll::-webkit-scrollbar { display: none; }

/* ------------------------------------------- 横向滚动区：遮罩 + 指示点 */
/**
 * 可横向滑动的分类条（首页服务分类、全部服务页）外面包一层 .seg-wrap：
 *  - 左右两侧渐变遮罩：没滑到头时提示「这边还有内容」
 *  - 下方圆点指示当前落在第几项，点圆点可直接跳到对应分类
 * 仅当内容真正溢出时才显示，宽屏放得下时自动隐藏（由 App.scrollStrip 切换 .overflow）。
 */
.seg-wrap { position: relative; }
.seg-wrap::before, .seg-wrap::after {
  content: ''; position: absolute; top: 0; bottom: 4px; width: 30px;
  pointer-events: none; opacity: 0; transition: opacity var(--t); z-index: 1;
}
.seg-wrap::before { left: 0; background: linear-gradient(90deg, #fff 26%, rgba(255, 255, 255, 0)); }
.seg-wrap::after { right: 0; background: linear-gradient(270deg, #fff 26%, rgba(255, 255, 255, 0)); }
.seg-wrap.overflow.can-left::before { opacity: 1; }
.seg-wrap.overflow.can-right::after { opacity: 1; }

.seg-dots {
  display: flex; justify-content: center; align-items: center; gap: 5px;
  margin-top: 7px; min-height: 8px;
}
.seg-dots:empty { display: none; }
/* 内容没溢出（宽屏放得下）时不显示圆点，避免无意义的装饰 */
.seg-wrap:not(.overflow) + .seg-dots { display: none; }
.seg-dot {
  width: 6px; height: 6px; padding: 0; border: none; border-radius: 50%;
  background: var(--line-3); cursor: pointer; flex: none;
  transition: width var(--t), background var(--t);
}
.seg-dot:hover { background: var(--brand-line); }
.seg-dot.on { width: 16px; border-radius: var(--radius-pill); background: var(--brand); }
.seg-dot:focus-visible { box-shadow: var(--focus-ring); }

/* ------------------------------------------------------------ 次级入口 */
/**
 * 次级胶囊入口：游客栏的「去登录」、新人礼包的「登录领取 / 去使用」、
 * 其他页面的游客提示统一用它；描边 + 浅色底，视觉重量明显低于主按钮，
 * 保证首页只有一个「主登录」抢视线。
 */
.entry-pill {
  display: inline-flex; align-items: center; gap: 2px; flex: none;
  padding: 4px 11px; border-radius: var(--radius-pill);
  border: 1px solid var(--brand-line); background: #fff; color: var(--brand-darker);
  font-size: 12.5px; font-weight: 600; line-height: 1.6; white-space: nowrap;
  transition: background var(--t), border-color var(--t), color var(--t);
}
.entry-pill:hover { background: var(--brand-soft); border-color: var(--brand); text-decoration: none; }
.entry-pill:active { transform: scale(.97); }
/* 品牌渐变底（首页游客栏）上使用 */
.entry-pill.on-brand {
  color: #fff; border-color: rgba(255, 255, 255, .5); background: rgba(255, 255, 255, .14);
}
.entry-pill.on-brand:hover { background: rgba(255, 255, 255, .28); border-color: rgba(255, 255, 255, .8); }

/* ---------------------------------------------------------------- 头像 */

.avatar {
  width: 52px; height: 52px; border-radius: 50%; background: var(--brand-soft); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700; flex: none; overflow: hidden; letter-spacing: 0;
}
.avatar.lg { width: 80px; height: 80px; font-size: 30px; }
.avatar.sm { width: 40px; height: 40px; font-size: 16px; }
.avatar.xs { width: 32px; height: 32px; font-size: 13px; }
.avatar.ring { border: 2px solid var(--brand-line); }
.avatar.ghost { background: rgba(255, 255, 255, .22); color: #fff; }

/* 稳定色调（按姓名哈希分配）：头像、分类图标共用 */
.t1 { background: #e8f7ef; color: #128a4f; }
.t2 { background: #e9f1fd; color: #2f6fd0; }
.t3 { background: #fdf1e3; color: #b8720a; }
.t4 { background: #f0ecfd; color: #6b4fd0; }
.t5 { background: #e5f6f6; color: #0f8080; }
.t6 { background: #fdecef; color: #c93a5b; }

/* ------------------------------------------------- 服务分类圆形图标 */

/**
 * 全站统一的服务项图标：圆形浅色底 + 线性图标。
 * 取代原先的「单字方块」，首页套餐 / 分类筛选 / 技师详情 / 下单页保持一致。
 */
.cat-badge {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; flex: none; width: 46px; height: 46px;
  background: var(--brand-soft); color: var(--brand);
  border: 1px solid rgba(22, 160, 93, .14);
}
.cat-badge .ic { width: 22px; height: 22px; stroke-width: 1.7; }
.cat-badge.lg { width: 46px; height: 46px; }
.cat-badge.md { width: 36px; height: 36px; }
.cat-badge.md .ic { width: 18px; height: 18px; }
.cat-badge.sm { width: 20px; height: 20px; margin-right: 5px; vertical-align: -5px; }
.cat-badge.sm .ic { width: 12px; height: 12px; stroke-width: 2; }
/* 分类色调：与主色同一色相家族，饱和度统一，避免全站配色跳脱 */
.c1 { background: #e8f7ef; color: #128a4f; border-color: rgba(18, 138, 79, .18); }
.c2 { background: #eaf4ff; color: #2f7fe0; border-color: rgba(47, 127, 224, .18); }
.c3 { background: #fdf1e3; color: #c77700; border-color: rgba(199, 119, 0, .18); }
.c4 { background: #f0ecfd; color: #6b4fd0; border-color: rgba(107, 79, 208, .18); }
.c5 { background: #fdecef; color: #c93a5b; border-color: rgba(201, 58, 91, .18); }

/* ---------------------------------------------------------------- 表单 */

.field { margin-bottom: var(--gap); }
.field > label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: var(--gap-xs); font-weight: 600; }
.field .hint { font-size: 12px; color: var(--ink-3); margin-top: var(--gap-xs); }
.input, .select, .textarea {
  width: 100%; border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  padding: 11px 12px; background: #fff; outline: none;
  transition: border-color var(--t), box-shadow var(--t), background var(--t);
}
.input::placeholder, .textarea::placeholder { color: #b4b9bf; }
.input:hover, .select:hover, .textarea:hover { border-color: #d3d8dd; }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--brand); background: #fff;
  box-shadow: var(--focus-ring);
}
.input.err, .textarea.err { border-color: var(--red); box-shadow: var(--focus-ring-danger); }

/* 密码框「显示 / 隐藏」切换 */
.input-wrap { position: relative; display: block; }
.input-wrap .input { padding-right: 44px; }
.field-eye {
  position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
  width: 32px; height: 32px; border-radius: var(--radius-xs);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink-3); background: none; transition: color var(--t), background var(--t);
}
.field-eye .ic { width: 18px; height: 18px; }
.field-eye:hover { color: var(--brand); background: var(--brand-soft); }
.field-eye[aria-pressed="true"] { color: var(--brand); }

/* 行内错误提示：登录失败原因常驻表单，不用一闪而过的 toast */
.form-alert {
  display: flex; align-items: flex-start; gap: 7px;
  margin-top: var(--gap); padding: 9px 11px; border-radius: var(--radius-sm);
  background: var(--red-soft); color: var(--red-dark); border: 1px solid #ffd2d3;
  font-size: 12.5px; line-height: 1.55;
}
.form-alert .ic { width: 15px; height: 15px; flex: none; margin-top: 2px; }
.form-alert.warn { background: var(--warn-bg); color: var(--warn-text); border-color: var(--warn-line); }
.form-alert.hidden { display: none; }

/* 协议勾选与「未勾选」状态（提示用品牌绿，保持全站只有一个主色） */
.agree-hint { font-size: 12px; color: var(--brand-dark); margin-top: 6px; }
.auth-agree.need-agree .check { color: var(--ink-3); }
.auth-agree.need-agree .check a { color: var(--ink-2); }
.textarea { min-height: 76px; resize: vertical; }
.select {
  appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, #8b9299 50%), linear-gradient(135deg, #8b9299 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px; background-repeat: no-repeat;
}
.check { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; line-height: 1.55; cursor: pointer; color: var(--ink-2); }
.check input {
  width: 18px; height: 18px; margin-top: 1px; accent-color: var(--brand);
  flex: none; cursor: pointer; border-radius: 4px;
}
.check input:focus-visible { box-shadow: var(--focus-ring); border-radius: 4px; }
.check a { color: var(--brand); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.check a:hover { color: var(--brand-dark); }
.check.err { color: var(--red); }
.check.err .box { animation: shake .3s ease; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* 协议正文排版 */
.doc { font-size: 14.5px; line-height: 1.85; color: var(--ink-2); }
.doc h2 { font-size: 16px; color: var(--ink); margin: 22px 0 8px; }
.doc h2:first-child { margin-top: 4px; }
.doc p { margin-bottom: 10px; }
.doc ol, .doc ul { margin: 0 0 12px; padding-left: 22px; }
.doc ol { list-style: decimal; }
.doc ul { list-style: disc; }
.doc li { margin-bottom: 6px; }
.doc .lead { background: var(--brand-soft); border-radius: var(--radius-sm); padding: 12px 14px; color: var(--brand-darker); font-size: 13.5px; margin-bottom: 16px; }
.doc table { width: 100%; border-collapse: collapse; margin: 8px 0 16px; font-size: 13.5px; }
.doc th, .doc td { border: 1px solid var(--line-2); padding: 8px 10px; text-align: left; vertical-align: top; }
.doc th { background: var(--line-soft); font-weight: 600; color: var(--ink); }

/* ---------------------------------------------------------------- 底部导航 */

.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
  background: rgba(255, 255, 255, .97); backdrop-filter: blur(8px);
  border-top: 1px solid var(--line-2);
  display: flex; align-items: center;
  min-height: var(--tabbar-h);
  padding: 6px 0 calc(6px + env(safe-area-inset-bottom, 0px));
  max-width: var(--maxw); margin: 0 auto;
}
.tabbar a {
  flex: 1; text-align: center; font-size: 11px; color: var(--ink-3);
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 0;
  transition: color var(--t);
}
.tabbar a .ic { width: 21px; height: 21px; }
.tabbar a:hover { color: var(--brand); }
.tabbar a.on { color: var(--brand); font-weight: 700; }

/* ---------------------------------------------------------------- 步骤条 */

.steps { display: flex; align-items: flex-start; gap: 0; margin: 4px 0 2px; }
.steps .step { flex: 1; text-align: center; position: relative; font-size: 12px; color: var(--ink-3); }
.steps .step::before {
  content: attr(data-i); display: flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%; margin: 0 auto 6px;
  background: #f2f3f5; color: var(--ink-3); font-size: 12px; font-weight: 700;
}
.steps .step.done::before { background: var(--brand); color: #fff; }
.steps .step.now::before { background: var(--brand-soft); color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.steps .step.done, .steps .step.now { color: var(--brand); font-weight: 700; }

/* ---------------------------------------------------------------- 统计块 */

.stat {
  background: #fff; border-radius: var(--radius); padding: var(--gap); text-align: center;
  box-shadow: var(--shadow);
}
.stat b { display: block; font-size: 20px; color: var(--ink); }
.stat span { font-size: 12px; color: var(--ink-3); }
.stat.brand b { color: var(--brand); }
.stat.orange b { color: var(--orange-text); }
.stat.red b { color: var(--red); }

/* ---------------------------------------------------------------- 通知 */

.toast-host {
  position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%);
  z-index: 999; display: flex; flex-direction: column; gap: var(--gap-sm); align-items: center;
  pointer-events: none; width: max-content; max-width: 86vw;
}
.toast {
  background: rgba(28, 32, 38, .93); color: #fff; padding: 10px 16px;
  border-radius: var(--radius-sm); font-size: 14px; box-shadow: var(--shadow-lg);
  animation: toast-in .22s ease-out;
}
.toast.err { background: rgba(190, 40, 44, .95); }
.toast.ok { background: rgba(18, 138, 79, .96); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- 弹层 */

.modal-host {
  position: fixed; inset: 0; z-index: 900; background: rgba(0, 0, 0, .45);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fade-in .18s ease-out;
}
.modal-host.center-mode { align-items: center; padding: 20px; }
.modal {
  background: #fff; width: 100%; max-width: var(--maxw);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0; padding: 18px;
  max-height: 88vh; overflow: auto;
  animation: sheet-in .22s ease-out;
}
.modal-host.center-mode .modal { border-radius: var(--radius); max-width: 460px; }
.modal h3 { font-size: 17px; margin-bottom: var(--gap); }
.modal-close { position: absolute; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes sheet-in { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }

/* ---------------------------------------------------------------- 空态 / 加载 */

.empty { text-align: center; padding: 38px 16px; color: var(--ink-3); }
.empty .ico {
  width: 64px; height: 64px; margin: 0 auto var(--gap);
  border-radius: 50%; background: #f3f5f7; color: #b3bac2;
  display: flex; align-items: center; justify-content: center;
}
.empty .ico svg { width: 30px; height: 30px; }
.empty .strong { color: var(--ink-2); font-weight: 600; font-size: 14.5px; }
.empty .btn { max-width: 240px; margin: 14px auto 0; }
.empty.sm { padding: 24px 16px; }
.empty.sm .ico { width: 48px; height: 48px; }
.empty.sm .ico svg { width: 22px; height: 22px; }

.skeleton {
  background: linear-gradient(90deg, #f2f3f5 25%, #e9ebee 37%, #f2f3f5 63%);
  background-size: 400% 100%; animation: sk 1.3s ease infinite;
  border-radius: var(--radius-xs); height: 14px; margin: var(--gap-sm) 0;
}
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---------------------------------------------------------------- 表格 */

.table { width: 100%; border-collapse: collapse; background: #fff; font-size: 13px; }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table th { background: var(--line-soft); color: var(--ink-2); font-weight: 600; font-size: 12px; }
.table tbody tr { transition: background var(--t); }
.table tbody tr:hover { background: var(--line-soft); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ---------------------------------------------------------------- 管理端 */

.admin-body { background: #f2f4f7; }
.admin-shell { display: flex; min-height: 100vh; }
.admin-nav {
  width: 216px; flex: none; background: #1f2733; color: #c8d0da;
  padding: 18px 0; position: sticky; top: 0; height: 100vh; overflow: auto;
}
.admin-nav .logo { padding: 0 20px 18px; color: #fff; font-weight: 800; font-size: 16px; display: flex; align-items: center; gap: 9px; }
.admin-nav .logo small { display: block; font-weight: 400; font-size: 11px; color: #8b97a6; margin-top: 4px; }
.admin-nav a {
  display: flex; align-items: center; gap: 10px; padding: 11px 20px;
  font-size: 14px; color: #c8d0da; border-left: 3px solid transparent;
  transition: background var(--t), color var(--t);
}
.admin-nav a .ic { width: 17px; height: 17px; opacity: .9; }
.admin-nav a:hover { background: #262f3d; color: #fff; }
.admin-nav a.on { background: #262f3d; color: #fff; border-left-color: var(--brand); font-weight: 700; }
.admin-main { flex: 1; min-width: 0; padding: 22px 26px 40px; }
.admin-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; gap: 16px; flex-wrap: wrap; }
.admin-head h2 { font-size: 20px; }
.admin-head p { color: var(--ink-3); font-size: 13px; }
.admin-panel { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: var(--gap-lg); margin-bottom: var(--gap-lg); }
.admin-panel h3 { font-size: 15px; margin-bottom: var(--gap); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.toolbar .input, .toolbar .select { width: auto; min-width: 160px; padding: 8px 10px; }
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { background: #fff; border-radius: var(--radius); padding: var(--gap-lg); box-shadow: var(--shadow); }
.kpi .k-label { color: var(--ink-3); font-size: 12px; }
.kpi .k-value { font-size: 24px; font-weight: 800; margin-top: var(--gap-xs); font-variant-numeric: tabular-nums; }
.kpi .k-foot { font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.kpi.brand .k-value { color: var(--brand); }
.kpi.orange .k-value { color: var(--orange-text); }
.kpi.blue .k-value { color: var(--blue); }

.bar-mini { height: 6px; background: #eef0f3; border-radius: var(--radius-pill); overflow: hidden; margin-top: var(--gap-xs); }
.bar-mini i { display: block; height: 100%; background: var(--brand); border-radius: var(--radius-pill); transition: width .4s ease; }

/* ---------------------------------------------------------------- 登录表单 / 门禁 */

.auth-wrap { max-width: 460px; margin: 0 auto; }
.auth-card { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: 20px; margin-bottom: var(--gap); }
.auth-card h3 { font-size: 16px; margin-bottom: var(--gap); font-weight: 700; }
.auth-foot { text-align: center; font-size: 12px; color: var(--ink-3); line-height: 1.9; }
.auth-foot a { color: var(--brand); font-weight: 600; }
.auth-foot a:hover { text-decoration: underline; }

/* 登录方式切换 / 输入区 */
.auth-fields { margin-top: var(--gap); }
.auth-form .seg { margin-bottom: 2px; }
.auth-code-btn { flex: none; width: 118px; padding: 0 10px; font-size: 13px; }
.code-row { display: flex; gap: 8px; align-items: stretch; }
.code-row .input { flex: 1; min-width: 0; }
.code-row .auth-code-btn { margin-top: 0; }
.auth-links { text-align: right; margin-top: 8px; }
.link-btn {
  background: none; border: none; padding: 0; cursor: pointer;
  color: var(--brand); font-size: 13px; font-weight: 600;
}
.link-btn:hover { text-decoration: underline; text-underline-offset: 2px; }
.auth-agree { margin-top: 14px; }

/* 管理端安全提示：跟随品牌绿，避免后台出现第二套主色 */
.auth-notice {
  display: flex; flex-direction: column; gap: 3px;
  background: var(--brand-soft); border: 1px solid var(--brand-line); color: var(--brand-darker);
  border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: var(--gap);
  font-size: 12.5px; line-height: 1.6;
}
.auth-notice b { font-size: 13.5px; color: var(--brand-darker); }
.auth-notice span { color: #4f8a6c; }

/* ------------------------------------------------------------ 费用与提示 */

.fee-note {
  display: inline-block; font-size: 11px; line-height: 1.5;
  color: var(--brand-darker); background: var(--brand-soft);
  border: 1px solid var(--brand-line); border-radius: var(--radius-pill);
  padding: 0 7px; margin-top: 3px; white-space: nowrap;
}
.fee-note.extra { color: var(--orange-text); background: var(--orange-soft); border-color: #ffd9a8; }

.notice-card h3 { margin-bottom: 4px; }
.notice-row { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.notice-row:last-child { border-bottom: none; padding-bottom: 0; }
.notice-row .ic { width: 17px; height: 17px; flex: none; margin-top: 3px; color: var(--brand); }
.notice-row b { font-size: 13.5px; }

/* 资质 / 上门费规则卡：标题与「更多」说明统一排布 */
.cred-card h3, .fee-rule-card h3 { margin-bottom: 6px; }
.cred-card .tag.line { margin-bottom: 0; }
.fee-rule-card { border: 1px solid var(--brand-line); }

/* ------------------------------------------------ 退改规则 / 安全保障 */

/* 退改规则卡：下单页与订单页显著提示，用品牌色描边 + 结论前置 */
.refund-card { border: 1px solid var(--brand-line); background: linear-gradient(180deg, var(--brand-soft), #fff 42%); }
.refund-card h3 { margin-bottom: 6px; }
.refund-now {
  display: flex; gap: 8px; align-items: flex-start;
  background: #fff8e8; border: 1px solid #ffe1ad; color: var(--warn-strong);
  border-radius: var(--radius-sm); padding: 9px 11px; font-size: 12.5px; line-height: 1.65; margin: 4px 0 6px;
}
.refund-now .ic { width: 15px; height: 15px; flex: none; margin-top: 2px; }
.refund-card .btn-row { margin-top: 10px; }

/* 订单页顶部一句话退改提示条 */
.notice-bar {
  display: flex; gap: 10px; align-items: center;
  background: linear-gradient(100deg, #eef8f2, #e2f4ea);
  border: 1px solid var(--brand-line); border-radius: var(--radius);
  padding: 10px 12px; margin-bottom: 12px; font-size: 13px; color: var(--brand-darker);
  line-height: 1.6;
}
.notice-bar .ic { width: 18px; height: 18px; flex: none; color: var(--brand); }
.notice-bar .link-btn { flex: none; }

/* 订单卡片内的退改提示条 */
.refund-line {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  border-radius: var(--radius-sm); padding: 7px 10px; margin-top: 10px;
  font-size: 12.5px; line-height: 1.6; background: var(--brand-soft); color: var(--brand-darker);
  border: 1px solid var(--brand-line);
}
.refund-line .ic { width: 15px; height: 15px; flex: none; }
.refund-line.warn { background: #fff8e8; color: var(--warn-strong); border-color: #ffe1ad; }
.refund-line.gray { background: var(--line-soft); color: var(--ink-3); border-color: var(--line-2); }
.refund-line .link-btn { flex: none; }
.refund-line .link-btn.sos { color: var(--red); font-weight: 700; }

/* 「查看全部」入口：首页服务分类卡片底部 */
.more-link {
  display: block; text-align: center; margin-top: 12px; padding-top: 11px;
  border-top: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--brand-darker);
}
.more-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* 游客提示条（技师详情 / 全部服务分类页共用） */
.guest-tip {
  display: flex; align-items: center; gap: 8px; background: var(--brand-soft);
  color: var(--brand-darker); border: 1px solid var(--brand-line);
  border-radius: var(--radius-sm); padding: 9px 12px; font-size: 12.5px; margin-bottom: 12px;
}
.guest-tip .ic { width: 16px; height: 16px; flex: none; }

/* 退改规则一句话链接（技师详情页等非下单页使用） */
.refund-inline { margin-top: 10px; font-size: 12.5px; color: var(--ink-3); line-height: 1.7; }
.refund-inline a { color: var(--brand-darker); font-weight: 600; }

/* 技师详情页「安全保障」区 */
.safety-card { border: 1px solid var(--brand-line); }
.safety-card h3 { margin-bottom: 6px; }
.safety-card .btn-row { margin-top: 10px; }

/* 游客统一登录引导弹窗 */
.login-guide .lg-head { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; }
.login-guide .lg-head .ic { width: 22px; height: 22px; flex: none; color: var(--brand); margin-top: 1px; }
.login-guide .lg-head b { font-size: 15px; }
.login-guide .lg-list { list-style: none; margin: 0 0 10px; padding: 0; }
.login-guide .lg-list li { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--ink-2); padding: 5px 0; }
.login-guide .lg-list .ic { width: 16px; height: 16px; flex: none; color: var(--brand); }

/* 确认弹窗里的多行说明（退改规则等）保留换行 */
.modal-body .muted { white-space: pre-line; }

/* 隐私政策顶部「收集什么 / 用来做什么 / 保存多久 / 你的权利」速览 */
.privacy-summary {
  border: 1px solid var(--brand-line); background: var(--brand-soft);
  border-radius: var(--radius-sm); padding: 10px 12px; margin: 4px 0 14px;
}
.privacy-summary > div { display: flex; gap: 8px; padding: 5px 0; font-size: 12.5px; line-height: 1.7; }
.privacy-summary b { flex: none; width: 74px; color: var(--brand-darker); }
.privacy-summary span { color: var(--ink-2); }

/* ------------------------------------------------------------ 站点页脚 */

.foot-links {
  text-align: center; font-size: 12px; color: var(--ink-3);
  margin-top: 18px; line-height: 1.9; padding: 0 4px;
}
.foot-notice { margin-bottom: 2px; }
.foot-nav { margin-top: 8px; font-size: 12.5px; }
.foot-nav a { color: var(--ink-2); font-weight: 600; }
.foot-nav a:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.foot-sep { margin: 0 6px; color: var(--ink-3); }
.foot-copy { margin-top: 6px; color: #b3b8be; font-size: 11.5px; }

.gate-host {
  position: fixed; inset: 0; z-index: 800; background: var(--bg);
  overflow: auto; padding: 28px 16px 44px;
  animation: fade-in .2s ease-out;
}
.gate-head { text-align: center; margin-bottom: 20px; }
.gate-head p { color: var(--ink-3); font-size: 13px; margin-top: 10px; }

/* ---------------------------------------------------------------- 角色门户 */

.portal { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.portal-inner { max-width: 860px; width: 100%; }
.portal h1 { font-size: 26px; margin-bottom: var(--gap-xs); }
.role-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 20px; }
.role-card {
  background: #fff; border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow);
  border: 2px solid transparent; cursor: pointer; transition: border-color var(--t), transform var(--t), box-shadow var(--t);
  text-align: left; width: 100%;
}
.role-card:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.role-card:active { transform: translateY(0); }
.role-card .rc-ico {
  width: 46px; height: 46px; border-radius: var(--radius-sm); background: var(--brand-soft);
  color: var(--brand); display: flex; align-items: center; justify-content: center;
}
.role-card .rc-ico .ic { width: 22px; height: 22px; }
.role-card b { display: block; margin: 10px 0 4px; font-size: 16px; }
.role-card span { color: var(--ink-3); font-size: 13px; }

/* ---------------------------------------------------------------- 响应式 */

@media (min-width: 860px) {
  :root { --maxw: 720px; }
  .modal-host { align-items: center; padding: 24px; }
  .modal { border-radius: var(--radius-lg); max-width: 560px; animation: pop-in .2s ease-out; }
  .modal-host.center-mode .modal { max-width: 500px; }
  .tabbar { border-radius: var(--radius-lg) var(--radius-lg) 0 0; box-shadow: 0 -4px 20px rgba(0, 0, 0, .06); }
  .admin-shell { flex-direction: row; }
  .admin-nav { width: 216px; height: 100vh; position: sticky; display: block; padding: 18px 0; }
  .admin-nav .logo { display: flex; }
  .admin-nav a { padding: 11px 20px; border-left: 3px solid transparent; border-bottom: none; border-radius: 0; white-space: normal; }
  .admin-nav a.on { border-left-color: var(--brand); border-bottom-color: transparent; }
}
@keyframes pop-in { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }

@media (max-width: 859px) {
  .admin-shell { flex-direction: column; }
  .admin-nav {
    width: 100%; height: auto; position: sticky; top: 0; z-index: 40;
    display: flex; overflow-x: auto; padding: 8px; gap: 4px; scrollbar-width: none;
  }
  .admin-nav::-webkit-scrollbar { display: none; }
  .admin-nav .logo { display: none; }
  .admin-nav a {
    padding: 8px 12px 8px 20px; border-left: none; border-bottom: 3px solid transparent;
    white-space: nowrap; border-radius: var(--radius-xs); font-size: 13px;
  }
  .admin-nav a .ic { width: 15px; height: 15px; }
  .admin-nav a.on { border-left: none; border-bottom-color: var(--brand); }
  .admin-main { padding: var(--gap-lg); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .admin-head { flex-direction: column; align-items: flex-start; }
  .admin-head .toolbar { width: 100%; }
  .admin-head .toolbar .btn { flex: 1; }
  .toolbar .input, .toolbar .select { width: 100%; min-width: 0; }
  .kpi-row { grid-template-columns: repeat(2, 1fr); gap: var(--gap); }
  .kpi { padding: var(--gap); }
  .kpi .k-value { font-size: 20px; }
}

@media (max-width: 420px) {
  .grid-2 { grid-template-columns: 1fr; }
  .wrap { padding: 12px; padding-bottom: 20px; }
  .wrap.has-tabbar { padding-bottom: var(--safe-bottom); }
  .card { padding: 13px; }
  .kpi-row { grid-template-columns: 1fr; }
  .btn-row { flex-direction: column; }
  .btn-row .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

@media print { .bar, .tabbar, .admin-nav, .paybar, .gate-host { display: none; } }
