/* 技师到店共享平台 - 共享设计系统（与按摩店系统同家族脸） */
:root {
  --brand: #0E7A5F;
  --brand-2: #12A37F;
  --brand-grad: linear-gradient(145deg, #083B2E 0%, #0E7A5F 58%, #14A37F 100%);
  --brand-soft: #E5F2ED;
  --gold: #C9A227;
  --gold-grad: linear-gradient(135deg, #E7CC6F 0%, #C9A227 100%);
  --gold-soft: #F8F1DC;
  --red: #E5484D;
  --red-soft: #FDEBEC;
  --green: #0EA47A;
  --green-soft: #E4F6EF;
  --blue: #3B82F6;
  --blue-soft: #E8F0FE;
  --orange: #D97706;
  --orange-soft: #FDF0DD;
  --bg: #F3F5F7;
  --card: #FFFFFF;
  --text: #0F172A;
  --text-2: #55657A;
  --text-3: #9AA8B4;
  --line: #EDF1F3;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 6px 20px rgba(15, 23, 42, .05);
  --shadow-lg: 0 12px 34px rgba(14, 122, 95, .18);
  --tab-h: 58px;
  --topbar-h: 52px;
  --safe-b: 0px;
  --safe-t: 0px;
  --anim: .22s cubic-bezier(.4, 0, .2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: calc(var(--tab-h) + var(--safe-b) + 20px);
}

/* ============ 顶部栏 ============ */
.topbar {
  position: fixed; top: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; height: var(--topbar-h);
  background: var(--card);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 700;
  z-index: 100; padding-top: var(--safe-t);
  border-bottom: 1px solid var(--line);
}
.topbar .tb-back {
  position: absolute; left: 8px; top: calc(var(--safe-t) + 6px);
  width: 38px; height: 38px; border: none; background: none;
  font-size: 22px; color: var(--text); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.topbar .tb-right {
  position: absolute; right: 12px; top: calc(var(--safe-t) + 8px);
  font-size: 13px; color: var(--brand); font-weight: 600; border: none; background: none; cursor: pointer;
}

/* ============ 底部导航 ============ */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; height: calc(var(--tab-h) + var(--safe-b));
  background: var(--card);
  display: flex; z-index: 100;
  border-top: 1px solid var(--line);
  padding-bottom: var(--safe-b);
}
.tabbar .tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; font-size: 11px; color: var(--text-3); cursor: pointer;
  border: none; background: none; transition: color .2s;
}
.tabbar .tab .ic { font-size: 21px; line-height: 1; }
.tabbar .tab.active { color: var(--brand); font-weight: 700; }
.tabbar .tab.active .ic { transform: scale(1.08); }

/* ============ 页面容器 ============ */
.page { display: none; padding-top: calc(var(--topbar-h) + var(--safe-t)); animation: pageIn .2s ease; }
.page.active { display: block; }
@keyframes pageIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.page.no-topbar { padding-top: calc(var(--safe-t) + 8px); }

/* ============ 卡片 ============ */
.card {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  margin: 12px;
  padding: 16px;
}
.card-title { font-size: 15px; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; }
.card-title .more { font-size: 12px; color: var(--text-3); font-weight: 400; }

/* ============ 按钮 ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 44px; padding: 0 18px; border: none; border-radius: 12px;
  font-size: 15px; font-weight: 600; cursor: pointer;
  background: var(--brand-soft); color: var(--brand);
  transition: transform .12s ease, opacity .2s;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--brand-grad); color: #fff; box-shadow: var(--shadow-lg); }
.btn-gold { background: var(--gold-grad); color: #fff; }
.btn-danger { background: var(--red-soft); color: var(--red); }
.btn-block { width: 100%; }
.btn-sm { height: 36px; font-size: 13px; padding: 0 14px; border-radius: 10px; }
.btn-lg { height: 50px; font-size: 16px; border-radius: 14px; }
.btn:disabled { opacity: .5; }

/* ============ 表单 ============ */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; font-weight: 600; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; height: 44px; border: 1px solid var(--line); border-radius: 12px;
  padding: 0 14px; font-size: 15px; background: var(--card); color: var(--text);
  outline: none; transition: border-color .2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--brand); }
.form-group textarea { height: auto; padding: 12px 14px; resize: none; }

/* ============ 列表 ============ */
.list-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.list-item:last-child { border-bottom: none; }
.li-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--brand-soft); display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.li-body { flex: 1; min-width: 0; }
.li-title { font-size: 15px; font-weight: 600; }
.li-sub { font-size: 12px; color: var(--text-3); margin-top: 3px; }
.li-right { text-align: right; flex-shrink: 0; }
.li-right .amt { font-size: 15px; font-weight: 700; }

/* ============ 状态标签 ============ */
.tag { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.tag-green { background: var(--green-soft); color: var(--green); }
.tag-gold { background: var(--gold-soft); color: var(--gold); }
.tag-gray { background: #F1F3F5; color: var(--text-3); }
.tag-blue { background: var(--blue-soft); color: var(--blue); }
.tag-red { background: var(--red-soft); color: var(--red); }

/* ============ 弹窗 ============ */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .5);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  z-index: 200; padding: 24px; animation: fadeIn .18s ease;
}
.modal-mask.hidden { display: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-body {
  background: #fff; border-radius: 20px; padding: 22px;
  width: 100%; max-width: 400px; max-height: 82vh; overflow-y: auto;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .25);
  animation: modalIn .24s cubic-bezier(.4, 0, .2, 1);
}
.modal-body h3 { font-size: 17px; font-weight: 700; margin-bottom: 16px; text-align: center; }
.modal-body .m-tip { font-size: 12px; color: var(--text-3); text-align: center; margin: 6px 0 14px; }
@keyframes modalIn { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }

/* ============ 通知 ============ */
.toast {
  position: fixed; top: 20%; left: 50%; transform: translateX(-50%);
  background: rgba(15, 23, 42, .85); color: #fff;
  padding: 10px 20px; border-radius: 999px; font-size: 14px;
  z-index: 300; animation: toastIn .25s ease; white-space: nowrap; max-width: 86%; overflow: hidden; text-overflow: ellipsis;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, -10px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ============ 空状态 ============ */
.empty { text-align: center; padding: 48px 20px; color: var(--text-3); }
.empty .e-icon { font-size: 48px; margin-bottom: 12px; }
.empty .e-text { font-size: 14px; }

/* ============ 登录页 ============ */
.login-wrap {
  min-height: 100vh; background: var(--brand-grad);
  display: flex; flex-direction: column; padding: 60px 32px 40px;
}
.login-logo { text-align: center; margin-bottom: 40px; }
.login-logo .lg-ic { font-size: 60px; }
.login-logo .lg-name { color: #fff; font-size: 26px; font-weight: 800; margin-top: 10px; letter-spacing: 1px; }
.login-logo .lg-sub { color: rgba(255,255,255,.75); font-size: 13px; margin-top: 6px; }
.login-card {
  background: rgba(255,255,255,.96); border-radius: 24px; padding: 28px 22px;
  box-shadow: 0 24px 60px rgba(0,0,0,.25);
}
.login-card .lc-title { font-size: 18px; font-weight: 700; text-align: center; margin-bottom: 20px; }
.role-switch { display: flex; background: var(--bg); border-radius: 12px; padding: 4px; margin-bottom: 18px; }
.role-switch .rs-item { flex: 1; height: 38px; display: flex; align-items: center; justify-content: center; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--text-2); cursor: pointer; }
.role-switch .rs-item.active { background: #fff; color: var(--brand); box-shadow: 0 2px 8px rgba(15,23,42,.08); }
.login-link { text-align: center; font-size: 13px; color: var(--text-2); margin-top: 14px; }
.login-link a { color: var(--brand); font-weight: 600; text-decoration: none; }
.login-footer { text-align: center; color: rgba(255,255,255,.6); font-size: 12px; margin-top: 30px; }

/* ============ 首页 hero ============ */
.hero {
  background: var(--brand-grad);
  margin: 12px; border-radius: var(--radius-lg);
  padding: 20px 18px; color: #fff; position: relative; overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.hero::after {
  content: ''; position: absolute; right: -40px; top: -40px;
  width: 140px; height: 140px; border-radius: 50%;
  background: rgba(255,255,255,.08);
}
.hero .h-greet { font-size: 14px; opacity: .85; }
.hero .h-name { font-size: 20px; font-weight: 800; margin-top: 2px; }
.hero .h-num { font-size: 34px; font-weight: 800; margin-top: 12px; letter-spacing: .5px; }
.hero .h-label { font-size: 12px; opacity: .8; margin-top: 2px; }
.hero .h-row { display: flex; gap: 20px; margin-top: 16px; }
.hero .h-cell { flex: 1; background: rgba(255,255,255,.12); border-radius: 12px; padding: 10px 12px; }
.hero .h-cell .v { font-size: 16px; font-weight: 700; }
.hero .h-cell .k { font-size: 11px; opacity: .75; margin-top: 2px; }

/* ============ 金刚区入口 ============ */
.grid-cells { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px; }
.grid-cell {
  background: var(--card); border-radius: var(--radius-md);
  padding: 16px 8px; display: flex; flex-direction: column; align-items: center; gap: 8px;
  box-shadow: var(--shadow); cursor: pointer; transition: transform .12s;
  border: none;
}
.grid-cell:active { transform: scale(.95); }
.grid-cell .gc-icon { font-size: 26px; }
.grid-cell .gc-t { font-size: 13px; font-weight: 600; color: var(--text); }

/* ============ 订单状态色 ============ */
.st-pending { color: var(--orange); }
.st-grabbed, .st-confirmed { color: var(--blue); }
.st-arrived { color: var(--gold); }
.st-working { color: var(--brand); }
.st-done { color: var(--green); }
.st-settled { color: var(--green); }
.st-cancelled { color: var(--text-3); }
