/* 沐晓 · 咨询预约系统 · 共享样式 v3（雾蓝灰 / 晨白 / 暖砂） */
:root {
  --brand: #2E4459;
  --brand2: #4A657F;
  --mist: #8CA3B8;
  --mist-l: #E6EDF3;
  --sand: #B98A6F;
  --sand-l: #F8EFE9;
  --paper: #F6F8FA;
  --ink: #25313D;
  --ink-2: #65737F;
  --ink-3: #9AA8B4;
  --line: #E4EAF0;
  --card: #FFFFFF;
  --danger: #A65A52;
  --ok: #2E4459;
  --radius: 16px;
  --shadow: 0 4px 16px rgba(40, 65, 90, .05);
  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
a { color: var(--brand); text-decoration: none; }
.hide { display: none !important; }

/* ---------- 移动端外壳 ---------- */
.mobile-shell {
  max-width: 480px; margin: 0 auto; min-height: 100vh;
  background: var(--paper); position: relative;
  box-shadow: 0 0 46px rgba(40, 65, 90, .07);
}
.topbar {
  height: 54px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px; background: var(--paper); position: sticky; top: 0; z-index: 20;
}
.topbar .tb-title {
  font-family: var(--serif); font-size: 18px; font-weight: 500; letter-spacing: 2px; color: var(--brand);
}
.topbar .tb-left, .topbar .tb-right { min-width: 68px; font-size: 12.5px; color: var(--brand2); }
.topbar .tb-right { text-align: right; }
.tb-back { color: var(--ink-2) !important; }
.page { padding: 0 18px 108px; }

/* ---------- 首页品牌区 ---------- */
.hero { padding: 18px 18px 26px; position: relative; overflow: hidden; }
.hero .orb {
  position: absolute; right: -46px; top: -34px; width: 150px; height: 150px;
  border-radius: 50%; background: var(--mist-l); opacity: .85;
}
.hero .orb:after {
  content: ""; position: absolute; inset: 28px; border-radius: 50%;
  border: 1px solid var(--mist); opacity: .55;
}
.hero .eyebrow { font-size: 10.5px; letter-spacing: 2.6px; color: var(--mist); }
.hero h1 {
  font-family: var(--serif); font-size: 25px; font-weight: 500; letter-spacing: 1px;
  line-height: 1.5; margin: 12px 0 9px; position: relative;
}
.hero p { margin: 0; font-size: 12.5px; color: var(--ink-2); line-height: 1.85; position: relative; max-width: 300px; }

.section-title {
  display: flex; align-items: center; justify-content: space-between;
  margin: 22px 2px 12px; font-size: 15px; font-weight: 500;
}
.section-title small { font-size: 12px; font-weight: 400; color: var(--ink-3); }

/* ---------- 筛选胶囊 ---------- */
.topic-pills { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 12px; scrollbar-width: none; }
.topic-pills::-webkit-scrollbar { display: none; }
.topic-pill {
  flex: none; font-size: 12px; padding: 6px 14px; border-radius: 99px;
  background: #fff; border: 1px solid var(--line); color: var(--ink-2); white-space: nowrap;
}
.topic-pill.on { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px; margin-bottom: 12px;
}
.consultant-card { display: flex; gap: 14px; align-items: flex-start; }
.avatar {
  width: 52px; height: 52px; flex: none; border-radius: 15px;
  background: var(--mist-l); color: var(--brand); font-family: var(--serif);
  display: flex; align-items: center; justify-content: center; font-size: 21px;
}
.consultant-card .c-main { flex: 1; min-width: 0; }
.c-name { font-size: 16px; font-weight: 500; }
.c-title { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
.c-intro {
  font-size: 12.5px; color: var(--ink-2); margin-top: 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.tag {
  font-size: 11px; padding: 2px 8px; border-radius: 6px;
  background: var(--paper); color: var(--brand2); border: 1px solid var(--line);
}
.c-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line);
  font-size: 12px; color: var(--ink-3);
}
.c-foot .avail { color: var(--brand); font-weight: 500; }

/* ---------- 底部三 tab ---------- */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; height: 66px; z-index: 30;
  background: rgba(255, 255, 255, .96); border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-around;
  padding-bottom: env(safe-area-inset-bottom, 0); backdrop-filter: blur(8px);
}
.tabbar .tab-item {
  flex: 1; text-align: center; font-size: 10.5px; color: var(--ink-3);
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0;
}
.tabbar .tab-item.on { color: var(--brand); }
.tabbar .tab-icon {
  width: 19px; height: 19px; border: 1.7px solid currentColor; border-radius: 6px; opacity: .8;
}
.tabbar .tab-item.on .tab-icon { background: var(--brand); border-color: var(--brand); opacity: 1; }

/* ---------- 日期条 ---------- */
.date-strip { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 8px; scrollbar-width: none; }
.date-strip::-webkit-scrollbar { display: none; }
.date-chip {
  flex: none; min-width: 62px; text-align: center;
  border: 1px solid var(--line); background: #fff;
  border-radius: 12px; padding: 9px 6px; transition: .15s;
}
.date-chip .dw { font-size: 11px; color: var(--ink-3); }
.date-chip .dd { font-size: 17px; font-weight: 500; margin: 2px 0; }
.date-chip .dn { font-size: 10px; color: var(--brand2); }
.date-chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.date-chip.active .dw, .date-chip.active .dn { color: rgba(255,255,255,.8); }
.date-chip.disabled { opacity: .42; }

/* ---------- 时段 ---------- */
.slot-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.slot {
  border: 1px solid var(--line); background: #fff;
  border-radius: 11px; padding: 11px 4px; text-align: center;
  font-size: 14px; font-weight: 500; transition: .15s;
}
.slot small { display: block; font-size: 10.5px; font-weight: 400; color: var(--brand2); margin-top: 2px; }
.slot:not(:disabled):hover { border-color: var(--brand); color: var(--brand); }
.slot.booked { background: #F0F3F6; color: var(--ink-3); border-color: #EDF1F5; cursor: not-allowed; }
.slot.booked small { color: var(--ink-3); }
.slot.past { opacity: .42; cursor: not-allowed; }
.empty { text-align: center; padding: 34px 12px; color: var(--ink-3); font-size: 13px; }
.empty .empty-icon { font-size: 30px; display: block; margin-bottom: 8px; opacity: .5; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 10px; padding: 11px 18px; font-size: 14px; font-weight: 500;
  transition: .15s; border: 1px solid transparent;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:not(:disabled):hover { background: #24384B; }
.btn-outline { background: #fff; color: var(--brand); border-color: var(--brand); }
.btn-soft { background: var(--mist-l); color: var(--brand); }
.btn-gray { background: #F0F3F6; color: var(--ink-2); }
.btn-danger { background: #FAEFEE; color: var(--danger); }
.btn-sm { padding: 6px 12px; font-size: 12.5px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
.field label .req { color: var(--danger); }
.input, .textarea, .select {
  width: 100%; border: 1px solid var(--line); background: #fff;
  border-radius: 10px; padding: 10px 12px; outline: none; transition: .15s;
}
.input:focus, .textarea:focus, .select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--mist-l); }
.input:disabled, .textarea:disabled, .select:disabled { background: #F4F7F9; color: var(--ink-2); }
.textarea { resize: vertical; min-height: 90px; line-height: 1.7; }
.hint { font-size: 11.5px; color: var(--ink-3); margin-top: 5px; }

/* ---------- 弹层：告知书 ---------- */
.overlay {
  position: fixed; inset: 0; background: rgba(24, 40, 56, .45);
  z-index: 100; display: flex; align-items: flex-end; justify-content: center;
}
.sheet {
  width: 100%; max-width: 480px; background: #fff;
  border-radius: 20px 20px 0 0; height: 92vh;
  display: flex; flex-direction: column; overflow: hidden;
  animation: slideUp .22s ease-out;
}
@keyframes slideUp { from { transform: translateY(30px); opacity: .6; } to { transform: none; opacity: 1; } }
.sheet-head {
  padding: 14px 18px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; flex: none;
}
.sheet-head h3 { margin: 0; font-family: var(--serif); font-size: 16px; font-weight: 500; }
.sheet-close { font-size: 22px; color: var(--ink-3); line-height: 1; padding: 0 4px; }
.sheet-body { flex: 1; overflow-y: auto; padding: 0 18px; -webkit-overflow-scrolling: touch; }
.sheet-foot { flex: none; padding: 12px 18px 18px; border-top: 1px solid var(--line); background: #fff; }

.notice-meta { font-size: 11.5px; color: var(--ink-3); padding: 14px 0 10px; border-bottom: 1px dashed var(--line); }
.notice-doc h2 { font-family: var(--serif); font-size: 18px; text-align: center; margin: 18px 0 4px; font-weight: 500; }
.notice-doc .doc-sub { text-align: center; font-size: 11.5px; color: var(--ink-3); margin-bottom: 18px; }
.notice-doc h4 { font-size: 13.5px; margin: 18px 0 6px; color: var(--brand); }
.notice-doc p { font-size: 13px; color: var(--ink-2); line-height: 1.85; margin: 0 0 8px; text-align: justify; }
.notice-doc ol, .notice-doc ul { padding-left: 20px; margin: 0 0 8px; }
.notice-doc li { font-size: 13px; color: var(--ink-2); line-height: 1.85; }
.doc-end { text-align: center; font-size: 11.5px; color: var(--ink-3); padding: 18px 0 8px; }

.read-progress { height: 4px; background: var(--line); border-radius: 4px; overflow: hidden; margin: 10px 0 4px; }
.read-progress i { display: block; height: 100%; width: 0; background: var(--brand); transition: width .12s; }
.read-tip { font-size: 11.5px; color: var(--sand); display: flex; justify-content: space-between; }
.read-tip.done { color: var(--ok); }

.check-row { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; margin: 12px 0; color: var(--ink-2); }
.check-row input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--brand); flex: none; }
.check-row.disabled { opacity: .5; }

.sign-label { font-size: 13px; color: var(--ink-2); display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.sign-box {
  border: 1.5px dashed #C6D6E3; border-radius: 12px; background: #FBFDFE;
  position: relative; height: 130px; overflow: hidden;
}
.sign-box canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.sign-placeholder {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #B2C2D0; font-size: 13px; pointer-events: none;
}
.sign-line { position: absolute; left: 24px; right: 24px; bottom: 26px; border-bottom: 1px solid #E1E9F0; pointer-events: none; }

.step-pill {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11px;
  padding: 3px 9px; border-radius: 20px; background: var(--mist-l); color: var(--brand);
}
.step-pill.locked { background: #F0F3F6; color: var(--ink-3); }

/* ---------- 提示 ---------- */
.toast {
  position: fixed; left: 50%; top: 76px; transform: translateX(-50%);
  background: rgba(37, 49, 61, .93); color: #fff; font-size: 13px;
  padding: 10px 18px; border-radius: 10px; z-index: 300;
  box-shadow: 0 6px 20px rgba(0,0,0,.15); max-width: 86%; text-align: center;
}
.banner {
  border-radius: 10px; padding: 10px 12px; font-size: 12.5px; line-height: 1.75;
  background: var(--sand-l); color: #8A624C; border: 1px solid #F0DFD3;
}
.banner.info { background: var(--mist-l); color: var(--brand); border-color: #D7E3EC; }

/* ---------- 成功 / 详情 ---------- */
.success-icon {
  width: 62px; height: 62px; border-radius: 50%; background: var(--mist-l);
  color: var(--brand); font-size: 30px; display: flex; align-items: center; justify-content: center;
  margin: 12px auto 14px;
}
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.kv:last-child { border-bottom: none; }
.kv .k { color: var(--ink-3); flex: none; }
.kv .v { text-align: right; font-weight: 500; }
.sig-preview { width: 100%; max-width: 220px; display: block; margin: 8px auto 0; border: 1px solid var(--line); border-radius: 8px; }
.about-brand { font-family: var(--serif); font-size: 21px; color: var(--brand); letter-spacing: 2px; }
.about-line { font-size: 13px; color: var(--ink-2); line-height: 2; }

/* ---------- 后台：蓝灰固定侧栏 ---------- */
.admin-layout { display: flex; min-height: 100vh; }
.admin-side {
  width: 224px; flex: none; background: var(--brand); color: #fff;
  padding: 22px 14px; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.admin-side .side-logo {
  font-family: var(--serif); font-size: 19px; letter-spacing: 2px;
  padding: 0 8px 16px; border-bottom: 1px solid rgba(255,255,255,.14);
}
.role-chip {
  margin: 14px 8px 2px; font-size: 11px; padding: 7px 10px; border-radius: 8px;
  background: rgba(255,255,255,.12); color: rgba(255,255,255,.9); line-height: 1.5;
}
.role-chip.admin { background: rgba(185,138,111,.28); color: #F7E4D8; }
.side-group { font-size: 10.5px; color: rgba(255,255,255,.45); padding: 18px 10px 6px; letter-spacing: 1px; }
.nav-item {
  width: 100%; text-align: left; display: flex; align-items: center; gap: 10px;
  font-size: 13px; padding: 10px 11px; border-radius: 9px;
  color: rgba(255,255,255,.74); margin-bottom: 2px;
}
.nav-item:hover { background: rgba(255,255,255,.08); }
.nav-item.active { background: rgba(255,255,255,.16); color: #fff; }
.nav-item i { width: 13px; height: 13px; border: 1.5px solid currentColor; border-radius: 4px; opacity: .75; flex: none; }
.side-me {
  margin-top: auto; padding: 13px 8px 0; border-top: 1px solid rgba(255,255,255,.14);
  font-size: 11.5px; color: rgba(255,255,255,.72); display: flex; align-items: center; gap: 9px;
}
.side-me .sm-av {
  width: 28px; height: 28px; border-radius: 9px; background: rgba(255,255,255,.18);
  display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 13px;
}
.admin-main { flex: 1; min-width: 0; }
.admin-topbar {
  height: 66px; background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 0 26px; flex-wrap: wrap;
}
.admin-topbar h1 { margin: 0; font-size: 15px; font-weight: 500; }
.admin-topbar .crumb { font-size: 11px; color: var(--ink-3); margin-top: 1px; }
.admin-topbar .who {
  background: var(--paper); border: 1px solid var(--line); border-radius: 8px;
  padding: 5px 10px; font-size: 11.5px; color: var(--ink-2); white-space: nowrap;
}
.admin-wrap { padding: 22px 26px 60px; max-width: 1220px; }
.admin-wrap .section-lead { font-size: 12.5px; color: var(--ink-2); margin: 0 0 18px; line-height: 1.8; }
@media (max-width: 900px) {
  .admin-layout { flex-direction: column; }
  .admin-side { width: 100%; height: auto; position: static; padding: 14px; }
  .admin-side .side-logo { padding-bottom: 10px; }
  .side-group, .side-me { display: none; }
  .admin-side .nav-list { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; }
  .nav-item { width: auto; padding: 7px 11px; font-size: 12px; }
  .admin-wrap { padding: 18px 16px 50px; }
  .admin-topbar { padding: 12px 16px; height: auto; }
}

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
@media (max-width: 700px) { .stat-row { grid-template-columns: repeat(2, 1fr); } }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow); }
.stat .num { font-size: 24px; font-weight: 500; color: var(--brand); line-height: 1.2; }
.stat .lbl { font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.grid-2 { display: grid; grid-template-columns: 340px 1fr; gap: 20px; align-items: start; }
@media (max-width: 860px) { .grid-2 { grid-template-columns: 1fr; } }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.panel h2 { margin: 0 0 4px; font-size: 16px; font-weight: 500; }
.panel .panel-sub { font-size: 12px; color: var(--ink-3); margin-bottom: 18px; }
.time-checks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
@media (max-width: 560px) { .time-checks { grid-template-columns: repeat(3, 1fr); } }
.time-check {
  border: 1px solid var(--line); border-radius: 9px; padding: 9px 2px; text-align: center;
  font-size: 13px; cursor: pointer; background: #fff; user-select: none;
}
.time-check.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.time-check.taken { background: #F0F3F6; color: var(--ink-3); border-color: #EDF1F5; cursor: not-allowed; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th {
  text-align: left; font-weight: 400; color: var(--ink-3); font-size: 12px;
  padding: 10px 10px; border-bottom: 1px solid var(--line); background: #F8FAFC;
}
.data-table td { padding: 11px 10px; border-bottom: 1px solid #EDF1F5; }
.data-table tr:last-child td { border-bottom: none; }
.data-table .mono { font-variant-numeric: tabular-nums; }
.badge { font-size: 11px; padding: 2px 8px; border-radius: 20px; white-space: nowrap; }
.badge.ok { background: var(--mist-l); color: var(--brand); }
.badge.warn { background: var(--sand-l); color: var(--sand); }
.badge.gray { background: #F0F3F6; color: var(--ink-3); }
.table-wrap { overflow-x: auto; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .spacer { flex: 1; }
.week-view { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
@media (max-width: 900px) { .week-view { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 560px) { .week-view { grid-template-columns: repeat(2, 1fr); } }
.day-col { border: 1px solid var(--line); border-radius: 10px; padding: 10px; min-height: 90px; background: #FBFDFE; }
.day-col .dh { font-size: 12px; font-weight: 500; margin-bottom: 8px; color: var(--ink-2); }
.day-col .dh small { font-weight: 400; color: var(--ink-3); }
.mini-slot { font-size: 11px; padding: 4px 6px; border-radius: 6px; margin-bottom: 5px; display: flex; justify-content: space-between; align-items: center; gap: 4px; }
.mini-slot.free { background: var(--mist-l); color: var(--brand); }
.mini-slot.busy { background: #F0F3F6; color: var(--ink-3); }
.mini-slot .x { cursor: pointer; color: var(--danger); font-size: 13px; line-height: 1; }
.mini-slot.busy .x { display: none; }
.foot-note { font-size: 12px; color: var(--ink-3); text-align: center; padding: 18px 10px 4px; line-height: 1.8; }
.role-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 860px) { .role-list { grid-template-columns: 1fr; } }
.role-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: #FBFDFE; }
.role-card .rc-name { font-size: 14px; font-weight: 500; }
.role-card .rc-role { font-size: 11px; color: var(--brand); margin-top: 4px; }
.role-card .rc-tags { margin-top: 9px; }
