/* ========== 基础重置 ========== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei Light", "Microsoft YaHei UI", "Microsoft YaHei", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: 14px;
  color: #4a1830;
  background: #fff0f5;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ========== 布局 ========== */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 220px;
  background: linear-gradient(180deg, #fe86a4 0%, #ffcfdc 100%);
  color: #5a2540;
  padding: 24px 0 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  flex-shrink: 0;
  transition: width .25s ease;
  white-space: nowrap;
}
.sidebar.collapsed { width: 64px; }
.sidebar.collapsed .brand-text,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .nav-arrow,
.sidebar.collapsed .nav-group-title,
.sidebar.collapsed .sidebar-footer .nav-label { display: none; }
.sidebar.collapsed .nav-sub { display: none !important; }
.sidebar.collapsed .brand { justify-content: center; padding: 0 0 20px; }
.sidebar.collapsed .nav-item { flex-direction: column; justify-content: center; align-items: center; gap: 2px; padding: 8px 0; }
.sidebar.collapsed .nav-item .nav-icon { width: auto; }
.sidebar.collapsed .nav-mini { display: block; }
.sidebar.collapsed .nav-parent { justify-content: center; }
.sidebar.collapsed .sidebar-footer { text-align: center; padding: 16px 0; }

.main {
  flex: 1;
  min-width: 0;
  background: #fff0f5;
  display: flex;
  flex-direction: column;
}

/* ========== 侧边栏 ========== */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px 20px;
  border-bottom: 1px solid #f0a0b8;
  margin-bottom: 12px;
}
.brand-logo-img {
  width: 44px; height: 44px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}
.brand-name { font-size: 16px; color: #4a1830; font-weight: 500; letter-spacing: 1px; }
.brand-sub { font-size: 10px; color: #8a4868; letter-spacing: 1px; }

.sidebar-toggle {
  display: flex; align-items: center; justify-content: center;
  margin: 0 16px 12px;
  width: 28px; height: 28px;
  border-radius: 8px;
  color: #8a4868;
  transition: all .2s;
}
.sidebar-toggle:hover { background: #ffb0c8; color: #4a1830; }
/* 折叠按钮图标：展开状态(220px)显示‹(水平翻转)，折叠状态(64px)显示›(原始) */
.toggle-icon { transition: transform .25s ease; }
.sidebar:not(.collapsed) .toggle-icon { transform: scaleX(-1); }
.sidebar.collapsed .toggle-icon { transform: none; }

.nav-list { padding: 0 8px; }
.nav-group-title {
  font-size: 11px;
  color: #c06080;
  letter-spacing: 1px;
  padding: 12px 12px 6px;
  text-transform: uppercase;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: #6a2840;
  margin-bottom: 2px;
  cursor: pointer;
  transition: all .2s;
}
.nav-item:hover { background: #ffb0c8; color: #3a1020; }
.nav-item.active {
  background: #fff0f5;
  color: #4a1830;
  font-weight: 500;
}
.nav-icon { font-size: 15px; opacity: 0.9; flex-shrink: 0; width: 20px; text-align: center; }
.nav-label { flex: 1; }
.nav-mini { display: none; font-size: 10px; text-align: center; line-height: 1.2; }

/* Kitty 图标 */
.kitty-icon { display: inline-block; vertical-align: middle; object-fit: cover; border-radius: 6px; }
.kitty-nav-icon { width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0; }
.kitty-menu-icon { width: 85px; height: 85px; border-radius: 18px; margin-bottom: 10px; }
.menu-grid-compact .kitty-menu-icon { width: 60px; height: 60px; border-radius: 14px; margin-bottom: 10px; }
.kitty-empty-icon { width: 68px; height: 68px; border-radius: 14px; margin-bottom: 12px; opacity: 0.95; }
.kitty-btn-icon { width: 22px; height: 22px; border-radius: 5px; margin-right: 4px; vertical-align: middle; }
.kitty-title-icon { width: 26px; height: 26px; border-radius: 6px; margin-right: 6px; vertical-align: middle; }
.kitty-micro-icon { width: 18px; height: 18px; border-radius: 4px; margin-right: 3px; vertical-align: middle; }
.kitty-avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.kitty-success-icon { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 3px solid #ff85c1; margin-bottom: 12px; }
.kitty-error-icon { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 3px solid #ff85c1; margin-bottom: 12px; }
.kitty-del-icon { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 3px solid #ff85c1; margin-bottom: 12px; }

/* 顾客端会员卡“充值优惠”图标与文字同大 */
.mc-promo-title .kitty-title-icon { width: 1.1em; height: 1.1em; border-radius: 3px; vertical-align: middle; }

/* 父级导航 */
.nav-parent { user-select: none; }
.nav-arrow {
  display: flex; align-items: center;
  transition: transform .2s;
  opacity: 0.6;
}
.nav-parent.open .nav-arrow { transform: rotate(90deg); }

/* 子菜单 */
.nav-sub {
  max-height: 0;
  overflow: hidden;
  transition: max-height .25s ease;
}
.nav-sub.open { max-height: 300px; }
.nav-item.sub {
  padding-left: 42px;
  font-size: 12px;
  color: #8a4868;
}
.nav-item.sub.active { background: #fff0f5; color: #4a1830; }
.nav-item.sub .nav-icon { font-size: 12px; width: 16px; }

.sidebar-footer {
  font-size: 11px;
  color: #8a4868;
  padding: 16px 20px;
  margin-top: 24px;
  border-top: 1px solid #f0a0b8;
}

/* ========== 顶部 ========== */
.topbar {
  background: #fff0f5;
  border-bottom: 1px solid #f0c5d5;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar-home {
  width: 36px; height: 36px;
  border-radius: 8px;
  color: #8a4868;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.topbar-home:hover { background: #f5d5e0; color: #4a1830; }
.topbar-title {
  flex: 1;
  font-size: 16px;
  font-weight: 500;
  color: #4a1830;
  text-align: center;
}

/* ========== 首页品牌展示 ========== */
.page-dashboard .page-body { display: none; }
.splash {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff0f5;
}
.splash-text {
  text-align: center;
  color: #4a1830;
}
.splash-en {
  font-size: 36px;
  font-weight: 300;
  letter-spacing: 4px;
  color: #8a4868;
  margin-bottom: 12px;
}
.splash-dot {
  font-size: 16px;
  color: #d08098;
  margin: 6px 0;
}
.splash-cn {
  font-size: 64px;
  font-weight: 400;
  letter-spacing: 12px;
  color: #4a1830;
  margin: 10px 0;
  font-family: "Long Cang", "Ma Shan Zheng", "STKaiti", "KaiTi", "楷体", cursive;
  text-shadow: 0 2px 8px rgba(180,80,110,0.12);
}
.splash-sub {
  font-size: 16px;
  letter-spacing: 6px;
  color: #8a4868;
  margin-top: 10px;
}

/* ========== 首页数据同步 ========== */
.splash-sync {
  text-align: center;
  padding: 0 20px 32px;
}
.sync-hint {
  font-size: 12px;
  color: #a06880;
  margin-bottom: 10px;
}
.sync-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
}
.sync-btn {
  border: 1px solid #e8b0c8;
  padding: 8px 16px;
  font-size: 13px;
}
.sync-btn:hover {
  background: #f5d5e0;
  border-color: #c06080;
}

/* ========== 页面通用 ========== */
.page { display: none; flex: 1; flex-direction: column; }
.page.active { display: flex; }
.page-body {
  flex: 1;
  padding: 24px 32px 48px;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
}
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
}
.page-title-wrap { display: flex; align-items: center; gap: 12px; }
.page-title { font-size: 18px; font-weight: 500; color: #4a1830; }
.page-header-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ghost-btn {
  padding: 8px 14px;
  border-radius: 8px;
  background: transparent;
  color: #8a4868;
  font-size: 13px;
  border: 1px solid transparent;
  transition: all .2s;
}
.ghost-btn:hover { background: #f5d5e0; }
.btn-back { border: 1px solid #e8b0c8; }
.btn-back:hover { border-color: #c06080; color: #4a1830; }
.primary-btn {
  padding: 8px 18px;
  border-radius: 8px;
  background: #ff1493;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  transition: all .2s;
}
.primary-btn:hover { background: #d01080; }

/* ========== 菜单选择页 ========== */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 600px;
}
.menu-card {
  background: #fff0f5;
  border-radius: 16px;
  padding: 36px 28px;
  text-align: center;
  cursor: pointer;
  border: 1px solid #f0c5d5;
  transition: all .2s;
}
.menu-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(74,24,48,0.12);
  border-color: #e088a0;
}
.menu-icon {
  width: 60px; height: 60px;
  border-radius: 16px;
  background: linear-gradient(135deg, #e088a0 0%, #c06080 100%);
  color: #fff;
  font-size: 28px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.menu-name { font-size: 18px; font-weight: 500; color: #4a1830; margin-bottom: 6px; }
.menu-desc { font-size: 13px; color: #a06880; line-height: 1.5; }

/* ========== 数据分析 / 排班 共用 ========== */
.seg-tabs {
  display: inline-flex;
  background: #f5d5e0;
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 20px;
  gap: 2px;
}
.seg {
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 13px;
  color: #8a4868;
  transition: all .2s;
}
.seg.active {
  background: #ff1493;
  color: #fff;
  font-weight: 500;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.stat-card {
  background: #fff0f5;
  border-radius: 14px;
  padding: 18px 20px;
  border: 1px solid #f0c5d5;
}
.stat-label { font-size: 12px; color: #a06880; margin-bottom: 8px; }
.stat-value { font-size: 24px; font-weight: 500; color: #4a1830; margin-bottom: 4px; }
.stat-sub { font-size: 11px; color: #a06880; }

.panel {
  background: #fff0f5;
  border-radius: 16px;
  padding: 24px;
  border: 1px solid #f0c5d5;
  margin-bottom: 20px;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.panel-title { font-size: 15px; font-weight: 500; color: #4a1830; }
.panel-title .en { color: #d8a0b8; font-weight: 400; font-size: 13px; margin-left: 4px; }

/* ========== 查看预约 ========== */
.appt-view-toolbar {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 8px;
}
.appt-tab {
  border: 1px solid #e8b0c8;
  padding: 8px 18px;
}
.appt-tab.active {
  background: #ff1493;
  color: #fff;
  border-color: #ff1493;
  font-weight: 500;
}
.appt-view-pane { display: none; }
.appt-view-pane.active { display: block; }

.appointment-list { display: flex; flex-direction: column; gap: 10px; }
.appt-card {
  background: #fff0f5;
  border-radius: 12px;
  padding: 16px 20px;
  border: 1px solid #f0c5d5;
  display: flex;
  align-items: center;
  gap: 16px;
}
.appt-time {
  flex-shrink: 0;
  text-align: center;
  background: #fff8fb;
  border-radius: 10px;
  padding: 10px 14px;
  border: 1px solid #f5d5e0;
  min-width: 80px;
}
.appt-time .t { font-size: 18px; font-weight: 500; color: #4a1830; }
.appt-time .d { font-size: 11px; color: #a06880; margin-top: 2px; }
.appt-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.appt-customer { font-size: 15px; font-weight: 500; color: #4a1830; }
.appt-row { font-size: 12px; color: #a06880; }
.appt-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.appt-actions .text-btn { padding: 4px 0; }
.appt-status {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
}
.status-pending { background: #ffd8e8; color: #c06080; }
.status-done { background: #e8c8e0; color: #8a4868; }
.status-cancel { background: #f0b0c8; color: #a04060; }

.empty {
  text-align: center;
  padding: 60px 20px;
  color: #a06880;
}
.empty-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.6; }

/* ========== 日历 ========== */
.cal-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
}
.cal-nav-btn {
  width: 36px; height: 36px;
  border-radius: 8px;
  font-size: 20px;
  color: #8a4868;
  border: 1px solid #e8b0c8;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.cal-nav-btn:hover { background: #f5d5e0; border-color: #c06080; }
.cal-month-label {
  font-size: 18px;
  font-weight: 500;
  color: #4a1830;
  min-width: 140px;
  text-align: center;
}
.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 12px;
  color: #a06880;
  padding-bottom: 8px;
}
.cal-grid {
  display: flex;
  flex-direction: column;
}
.cal-week {
  display: flex;
  flex-direction: column;
  padding-bottom: 4px;
}
.cal-week-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  height: 36px;
}
.cal-day {
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #4a1830;
  border-radius: 8px;
  cursor: pointer;
  transition: all .15s;
  position: relative;
  background: #fff8fb;
  border: 1px solid #f5d5e0;
  box-sizing: border-box;
}
.cal-day:hover { background: #ffd8e8; border-color: #e088a0; }
.cal-day.empty { background: transparent; border: none; cursor: default; }
.cal-day.empty:hover { background: transparent; }
.cal-day.today {
  border: 2px solid #c06080;
  font-weight: 500;
}
.cal-day.selected {
  background: #ff1493;
  color: #fff;
  border-color: #ff1493;
}
.cal-day.has-appt::after {
  content: '';
  position: absolute;
  bottom: 4px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #d04068;
}
.cal-day.selected.has-appt::after { background: #fff; }

.cal-inline-detail {
  margin-top: 4px;
  margin-bottom: 4px;
  padding: 12px 16px;
  background: #fff0f5;
  border-radius: 10px;
  border: 1px solid #f0c5d5;
}
.cal-detail-title {
  font-size: 15px;
  font-weight: 500;
  color: #4a1830;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f0c5d5;
}
.cal-detail-empty {
  text-align: center;
  color: #a06880;
  font-size: 13px;
  padding: 12px 0;
}

/* ========== 预约表（5天×4时段） ========== */
.appt-table-card { padding: 20px 24px; }
.appt-table-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 14px;
}
.appt-table-range {
  font-size: 15px;
  font-weight: 500;
  color: #4a1830;
  min-width: 200px;
  text-align: center;
}
.appt-table-wrap {
  width: 100%;
  overflow-x: auto;
}
.appt-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 4px;
  table-layout: fixed;
}
.appt-table thead th {
  background: #fff8fb;
  color: #8a4868;
  font-size: 12px;
  font-weight: 500;
  padding: 10px 6px;
  border-radius: 8px;
  text-align: center;
  vertical-align: middle;
  position: relative;
}
.appt-table .appt-th-time {
  background: transparent;
  width: 70px;
  color: #a06880;
}
.appt-table .appt-th-day {
  background: linear-gradient(135deg, #e088a0 0%, #c06080 100%);
  color: #fff;
}
.appt-th-wd {
  display: block;
  font-size: 10px;
  color: inherit;
  opacity: 0.7;
  margin-top: 2px;
  font-weight: 400;
}
.appt-th-tag {
  display: inline-block;
  font-size: 10px;
  background: rgba(255, 255, 255, 0.3);
  color: #fff;
  padding: 1px 6px;
  border-radius: 8px;
  margin-left: 4px;
}

.appt-table tbody td {
  padding: 0;
  vertical-align: middle;
}
.appt-td-time {
  background: transparent;
  font-size: 13px;
  color: #a06880;
  text-align: center;
  font-weight: 500;
  width: 70px;
}
.appt-cell {
  border-radius: 10px;
  padding: 10px 8px;
  text-align: center;
  font-size: 12px;
  height: 64px;
  border: 1px solid transparent;
  transition: transform .15s, box-shadow .15s;
}
.appt-cell-status {
  font-size: 13px;
  font-weight: 500;
}
/* 已过去的（不可预约）—— 浅色，不可交互 */
.appt-cell-past {
  background: #fff8fb;
  color: #c0a0b8;
  border-color: #f5d5e0;
  cursor: not-allowed;
}
.appt-cell-past .appt-cell-status { color: #c0a0b8; }
/* 可预约 —— 深色，可点击新建 */
.appt-cell-available {
  background: #ffb2d0;
  color: #4a1830;
  border-color: #ffb2d0;
  cursor: pointer;
}
.appt-cell-available:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 20, 147, 0.25);
  background: #ff8fb8;
}
.appt-cell-available .appt-cell-status { color: #4a1830; }
/* 已预约 —— 深色，可点击编辑 */
.appt-cell-booked {
  background: #ff1493;
  color: #fff;
  border-color: #ff1493;
  cursor: pointer;
}
.appt-cell-booked:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 20, 147, 0.35);
  background: #d01080;
}
.appt-cell-booked .appt-cell-status { color: #fff; }
.appt-cell-sub {
  font-size: 11px;
  opacity: 0.9;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.menu-grid-compact {
  margin-top: 16px;
  grid-template-columns: repeat(2, 1fr);
  max-width: 600px;
  gap: 14px;
}
.menu-grid-compact .menu-card { padding: 20px 18px; }
.menu-grid-compact .menu-icon {
  width: 44px; height: 44px; font-size: 20px; border-radius: 12px; margin-bottom: 10px;
}
.menu-grid-compact .menu-name { font-size: 15px; margin-bottom: 4px; }
.menu-grid-compact .menu-desc { font-size: 12px; }

/* ========== 表单 ========== */
.form-card {
  background: #fff0f5;
  border-radius: 16px;
  padding: 24px;
  border: 1px solid #f0c5d5;
}
.form-row { margin-bottom: 18px; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-label {
  display: block;
  font-size: 13px;
  color: #8a4868;
  margin-bottom: 6px;
  font-weight: 500;
}
.required { color: #d04068; }
.form-control {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e8b0c8;
  border-radius: 8px;
  background: #fff8fb;
  color: #4a1830;
  font-size: 13px;
  outline: none;
  transition: border .2s;
}
.form-control:focus { border-color: #c06080; }
textarea.form-control { resize: vertical; font-family: inherit; }
.form-control-wrap { display: flex; flex-direction: column; gap: 6px; }
.link-btn { font-size: 12px; color: #c06080; text-align: left; padding: 0; }
.radio-group { display: flex; gap: 16px; padding: 8px 0; }
.radio { font-size: 13px; color: #4a1830; display: flex; align-items: center; gap: 4px; cursor: pointer; }
.chip-group { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 6px 12px;
  border-radius: 16px;
  background: #fff8fb;
  border: 1px solid #e8b0c8;
  font-size: 12px;
  color: #8a4868;
  cursor: pointer;
  transition: all .15s;
}
.chip:hover { border-color: #c06080; }
.chip.active { background: #ff1493; color: #fff; border-color: #ff1493; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; padding-top: 8px; }

/* ========== 顾客卡片 ========== */
.search-row { margin-bottom: 16px; }
.customer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.customer-card {
  background: #fff0f5;
  border-radius: 12px;
  padding: 16px 18px;
  border: 1px solid #f0c5d5;
  cursor: pointer;
  transition: all .2s;
}
.customer-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(74,24,48,0.08); }
.cc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.cc-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(135deg, #e088a0 0%, #c06080 100%);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  font-weight: 500;
  flex-shrink: 0;
}
.cc-name { font-size: 15px; font-weight: 500; color: #4a1830; }
.cc-phone { font-size: 11px; color: #a06880; margin-top: 2px; }

.cc-appt {
  background: #fff8fb;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  color: #8a4868;
  margin-bottom: 8px;
  line-height: 1.5;
  border: 1px solid #f5d5e0;
}
.cc-appt-next { background: #ffd8e8; border-color: #f0bcd0; color: #c06080; }
.appt-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 500;
  color: #a06880;
  background: #f5d5e0;
  padding: 1px 6px;
  border-radius: 4px;
  margin-right: 4px;
}
.cc-appt-next .appt-tag { background: #e8a8c0; color: #fff; }

.cc-row { display: flex; justify-content: space-between; font-size: 12px; margin-top: 6px; }
.cc-row .l { color: #a06880; }
.cc-row .v { color: #4a1830; font-weight: 500; }
.cc-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #e8b0c8;
}

/* ========== 排班管理 ========== */
.schedule-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 12px;
  flex-wrap: wrap;
}
.schedule-week { font-size: 14px; color: #4a1830; font-weight: 500; }
.schedule-nav { display: flex; gap: 8px; }
.schedule-hint { font-size: 12px; color: #a06880; margin-bottom: 12px; }
.schedule-table {
  background: #fff0f5;
  border-radius: 14px;
  border: 1px solid #f0c5d5;
  overflow: hidden;
  margin-bottom: 20px;
  overflow-x: auto;
}
.schedule-table table { width: 100%; border-collapse: collapse; min-width: 700px; }
.schedule-table th, .schedule-table td {
  padding: 10px 8px;
  text-align: center;
  border-bottom: 1px solid #f5d5e0;
  border-right: 1px solid #f5d5e0;
  font-size: 12px;
}
.schedule-table th { background: #fff8fb; color: #8a4868; font-weight: 500; }
.schedule-table th .d { color: #d8a0b8; font-size: 11px; font-weight: 400; }
.schedule-table td { vertical-align: top; min-height: 60px; color: #4a1830; }
.schedule-table tr:last-child td { border-bottom: none; }
.schedule-table td:last-child, .schedule-table th:last-child { border-right: none; }
.schedule-table td:first-child, .schedule-table th:first-child { text-align: left; padding-left: 16px; font-weight: 500; }
.shift-cell {
  background: #ffd8e8;
  border-radius: 6px;
  padding: 6px 4px;
  font-size: 11px;
  color: #c06080;
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.shift-cell.off { background: #e8d0e8; color: #8a4868; }
.shift-cell.empty { background: #f5d5e0; color: #a06880; }
.shift-cell .type { font-weight: 500; }
.shift-cell .time { font-size: 10px; }

.staff-list { display: flex; flex-direction: column; gap: 8px; }
.staff-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #fff8fb;
  border-radius: 10px;
  border: 1px solid #f5d5e0;
}
.staff-info { display: flex; align-items: center; gap: 10px; }
.staff-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(135deg, #e088a0 0%, #c06080 100%);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  font-weight: 500;
}
.staff-name { font-size: 14px; font-weight: 500; color: #4a1830; }
.staff-role { font-size: 11px; color: #a06880; margin-left: 6px; }
.staff-actions { display: flex; gap: 8px; }
.text-btn {
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  color: #8a4868;
}
.text-btn:hover { background: #f5d5e0; }
.text-btn.danger { color: #d04068; }

/* ========== 产品累计 ========== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.product-card {
  background: #fff0f5;
  border-radius: 12px;
  padding: 16px 18px;
  border: 1px solid #f0c5d5;
  position: relative;
  overflow: hidden;
}
.product-cover {
  height: 80px;
  border-radius: 8px;
  background: linear-gradient(135deg, #e8a8c0 0%, #e088a0 100%);
  margin-bottom: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
  color: #fff;
}
.product-name { font-size: 14px; font-weight: 500; color: #4a1830; margin-bottom: 4px; }
.product-price { font-size: 12px; color: #c06080; font-weight: 500; }
.product-stats { display: flex; justify-content: space-between; font-size: 12px; color: #a06880; margin-top: 8px; padding-top: 8px; border-top: 1px dashed #e8b0c8; }

/* ========== 数据分析 ========== */
.chart-wrap {
  width: 100%;
  background: #fff8fb;
  border-radius: 10px;
  padding: 12px;
  overflow: hidden;
}
#chart-rev {
  width: 100%;
  aspect-ratio: 600 / 220;
  display: block;
  height: auto;
}
.rank-list { display: flex; flex-direction: column; gap: 10px; }
.rank-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #fff8fb;
  border-radius: 8px;
}
.rank-no {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: #f5d5e0;
  color: #8a4868;
  font-size: 12px;
  font-weight: 500;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.rank-item:nth-child(1) .rank-no { background: #e090b0; color: #fff; }
.rank-item:nth-child(2) .rank-no { background: #d8a0b8; color: #fff; }
.rank-item:nth-child(3) .rank-no { background: #d8b0c8; color: #fff; }
.rank-name { flex: 1; font-size: 13px; color: #4a1830; }
.rank-bar {
  flex: 2;
  height: 8px;
  background: #f5d5e0;
  border-radius: 4px;
  overflow: hidden;
  max-width: 200px;
}
.rank-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #e088a0 0%, #c06080 100%);
  border-radius: 4px;
}
.rank-val { font-size: 12px; color: #c06080; font-weight: 500; min-width: 30px; text-align: right; }

/* ========== 弹层 ========== */
.modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; }
.modal.open { display: flex; }
.modal-mask { position: absolute; inset: 0; background: rgba(74,24,48,0.5); }
.modal-body {
  position: relative;
  background: #fff0f5;
  border-radius: 16px;
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid #f0c5d5;
}
.modal-title { font-size: 16px; font-weight: 500; color: #4a1830; }
.modal-close {
  width: 32px; height: 32px;
  font-size: 20px;
  border-radius: 8px;
  color: #8a4868;
}
.modal-close:hover { background: #f5d5e0; }
.modal-content { padding: 24px; overflow-y: auto; }

.member-info {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: #fff8fb;
  border-radius: 10px;
  margin-bottom: 16px;
}
.member-balance {
  text-align: center;
  padding: 20px;
  background: linear-gradient(135deg, #e088a0 0%, #c06080 100%);
  border-radius: 12px;
  color: #fff;
  margin-bottom: 16px;
}
.member-balance .l { font-size: 12px; opacity: 0.9; margin-bottom: 4px; }
.member-balance .v { font-size: 32px; font-weight: 500; }

/* ========== Toast ========== */
.toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: #ff1493;
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 13px;
  z-index: 1000;
  opacity: 0;
  transition: all .3s;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ========== 响应式 ========== */
@media (max-width: 1100px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .menu-grid { grid-template-columns: 1fr; }
}
@media (max-width: 800px) {
  .sidebar { width: 64px; }
  .sidebar .brand-text,
  .sidebar .nav-label,
  .sidebar .nav-arrow,
  .sidebar .nav-group-title,
  .sidebar .sidebar-footer .nav-label { display: none; }
  .sidebar .nav-sub { display: none !important; }
  .sidebar .brand { justify-content: center; padding: 0 0 20px; }
  .sidebar .nav-item { flex-direction: column; justify-content: center; align-items: center; gap: 2px; padding: 8px 0; }
  .sidebar .nav-item .nav-icon { width: auto; }
  .sidebar .nav-mini { display: block; }
  .sidebar:not(.collapsed) .toggle-icon { transform: none; }
  .page-body { padding: 16px; }
  .form-grid-2 { grid-template-columns: 1fr; }
  .splash-cn { font-size: 36px; }
  .splash-en { font-size: 24px; }
}

/* ========== 通知中心 ========== */
.notify-panel { padding: 0; overflow: hidden; }
.notify-hint {
  padding: 0 20px 14px;
  font-size: 13px;
  color: #8a4868;
  border-bottom: 1px dashed #f0c5d5;
  margin-bottom: 4px;
}
.notify-tabs {
  display: flex;
  gap: 24px;
  padding: 0 20px;
  border-bottom: 1px solid #f0c5d5;
}
.notify-tab {
  padding: 12px 4px;
  font-size: 14px;
  color: #8a4868;
  cursor: pointer;
  position: relative;
  transition: color .15s;
}
.notify-tab:hover { color: #d04068; }
.notify-tab.active { color: #d04068; font-weight: 500; }
.notify-tab.active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: #d04068;
  border-radius: 2px;
}
.notify-template {
  padding: 18px 20px 20px;
  border-top: 1px solid #f5d5e0;
  background: #fff8fb;
}
.notify-template:first-of-type { background: transparent; }
.notify-template-title {
  font-size: 15px;
  font-weight: 500;
  color: #4a1830;
  margin-bottom: 12px;
}
.notify-template-body {
  background: #fff0f5;
  border: 1px solid #f0c5d5;
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.9;
  color: #4a1830;
  margin-bottom: 14px;
  white-space: pre-wrap;
}
.notify-template-body .ph {
  color: #d04068;
  background: #ffd8e8;
  padding: 0 4px;
  border-radius: 4px;
}
.notify-fields { display: flex; flex-direction: column; gap: 12px; }
.notify-field-row { display: flex; flex-direction: column; gap: 6px; }
.notify-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.notify-label {
  font-size: 12px;
  color: #8a4868;
  font-weight: 500;
}
.notify-select { width: 100%; }
.notify-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.notify-btn {
  flex: 1;
  min-width: 90px;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid #f0c5d5;
  background: #fff;
  font-size: 13px;
  cursor: pointer;
  transition: all .15s;
  color: #4a1830;
}
.notify-btn:hover { background: #fff0f5; border-color: #e088a0; transform: translateY(-1px); }
.notify-btn:active { transform: translateY(0); }
.notify-btn.btn-sms { background: #ffd8e8; color: #c06080; border-color: #f0c5d5; }
.notify-btn.btn-wechat { background: #fff0f5; color: #c06080; border-color: #f0c5d5; }
.notify-btn.btn-copy { background: #d04068; color: #fff; border-color: #d04068; }
.notify-btn.btn-copy:hover { background: #b03050; }

/* ========== 记账簿 ========== */
.ledger-pane { display: none; }
.ledger-pane.active { display: block; }

.ledger-tabs { margin-bottom: 20px; }

.ledger-date-tip {
  font-size: 13px;
  color: #a06880;
  font-weight: 400;
}

.ledger-stats-3 {
  grid-template-columns: repeat(3, 1fr);
}
.ledger-stats-3-tight {
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 10px;
}
.ledger-stats-3-tight .stat-card { padding: 14px 16px; }
.ledger-stats-3-tight .stat-value { font-size: 20px; }

.ledger-record-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ledger-record-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: #fff8fb;
  border-radius: 10px;
  border: 1px solid #f5d5e0;
  transition: background .2s;
}
.ledger-record-card:hover { background: #fce8f0; }
.lr-info { flex: 1; min-width: 0; }
.lr-title { font-size: 14px; font-weight: 500; color: #4a1830; margin-bottom: 4px; }
.lr-sub { font-size: 12px; color: #a06880; }
.lr-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.lr-amount { font-size: 16px; font-weight: 500; }

.amount-income { color: #d01080; }
.amount-expense { color: #4caf50; }

.bar-chart-wrap {
  width: 100%;
  background: #fff8fb;
  border-radius: 10px;
  padding: 12px;
  overflow: hidden;
}
#chart-bar {
  width: 100%;
  aspect-ratio: 600 / 220;
  display: block;
  height: auto;
}

.service-type-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.service-type-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: #fff8fb;
  border-radius: 10px;
  border: 1px solid #f5d5e0;
  transition: background .2s;
}
.service-type-card:hover { background: #fce8f0; }
.svc-info { flex: 1; min-width: 0; }
.svc-name { font-size: 14px; font-weight: 500; color: #4a1830; margin-bottom: 4px; }
.svc-meta { font-size: 12px; color: #a06880; }
.svc-actions { display: flex; gap: 8px; flex-shrink: 0; }

.floating-add-wrap {
  display: flex;
  justify-content: center;
  padding: 12px 0 4px;
}
.floating-add-btn { min-width: 160px; }

@media (max-width: 800px) {
  .service-type-list { grid-template-columns: 1fr; }
  .ledger-stats-3, .ledger-stats-3-tight { grid-template-columns: repeat(3, 1fr); }
}

/* ========== 自助预约 ========== */
.sb-pane { display: none; }
.sb-pane.active { display: block; }

/* 顾客链接行（标签 + 链接 + 复制按钮，内联一行） */
.sb-link-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #fce8f0, #f5d5e0);
  border: 2px solid #ff1493;
  border-radius: 12px;
  flex-wrap: wrap;
}
.sb-link-row .sb-link-label {
  font-size: 14px;
  color: #4a1830;
  font-weight: 500;
  flex-shrink: 0;
  white-space: nowrap;
}
.sb-link-row .sb-link-url {
  flex: 1;
  min-width: 200px;
  font-size: 13px;
  color: #4a1830;
  word-break: break-all;
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  cursor: text;
  user-select: all;
  line-height: 1.5;
}
.sb-link-row .sb-link-copy {
  flex-shrink: 0;
  white-space: nowrap;
}
.sb-link-row .sb-link-url.placeholder {
  color: #a06880;
  font-style: italic;
}
.sb-link-hint {
  margin-top: 16px;
  padding: 14px 16px;
  background: #fff8fb;
  border-radius: 10px;
  font-size: 13px;
  color: #8a4868;
  line-height: 1.7;
  border: 1px solid #f5d5e0;
}
.sb-link-hint b { color: #4a1830; }
.sb-cloud-status {
  margin-top: 12px;
  text-align: center;
  font-size: 12px;
  color: #a06880;
}
.sb-cloud-status .synced { color: #2e7d32; }
.sb-cloud-status .expired { color: #d04068; }
.sb-cloud-status .pending { color: #c08040; }

/* 诊断面板 */
.sb-diag-panel {
  margin-top: 12px;
  padding: 10px 12px;
  background: rgba(0,0,0,0.03);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 8px;
  font-size: 12px;
}
.sb-diag-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.sb-diag-row:last-child { margin-bottom: 0; }
.sb-diag-label { color: #888; min-width: 70px; }
.sb-diag-value { color: #333; font-weight: 500; }
.sb-diag-log {
  margin-top: 8px;
  padding: 8px;
  background: rgba(0,0,0,0.05);
  border-radius: 4px;
  font-family: monospace;
  font-size: 11px;
  max-height: 200px;
  overflow-y: auto;
  white-space: pre-wrap;
  color: #555;
}

/* 自助预约管理（顾客待审核列表） */
.sb-schedule-hint {
  margin-bottom: 14px;
  padding: 10px 12px;
  background: #fff8fb;
  border-radius: 8px;
  font-size: 12px;
  color: #8a4868;
  line-height: 1.6;
  border: 1px solid #f5d5e0;
}
.sb-schedule-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sb-review-card {
  background: #fff;
  border: 1px solid #f5d5e0;
  border-left: 4px solid #ff4d97;
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 2px 8px rgba(255,77,151,0.06);
}
.sb-review-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
}
.sb-review-row-1 { margin-bottom: 8px; }
.sb-review-row-2 { margin-bottom: 8px; }
.sb-review-name { font-weight: 500; color: #4a1830; }
.sb-review-known { font-size: 12px; color: #2d8659; font-weight: 400; }
.sb-review-phone { color: #c06080; font-size: 13px; }
.sb-review-date, .sb-review-time, .sb-review-project {
  color: #4a1830;
  font-size: 13px;
}
.sb-review-project {
  background: #fff0f6;
  border-radius: 6px;
  padding: 3px 10px;
  color: #c2185b;
  font-size: 12px;
}
.sb-review-note {
  font-size: 12px;
  color: #8a4868;
  background: #fff8fb;
  padding: 6px 10px;
  border-radius: 6px;
  margin-bottom: 10px;
}
.sb-review-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}
.sb-review-approve,
.sb-review-reject {
  flex: 1;
  padding: 10px 0;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}
.sb-review-approve {
  background: linear-gradient(135deg, #ff85c1, #ff4d97);
  color: #fff;
  box-shadow: 0 2px 6px rgba(255, 77, 151, 0.25);
}
.sb-review-approve:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(255, 77, 151, 0.35); }
.sb-review-reject {
  background: #fff;
  color: #b04060;
  border: 1px solid #f5d5e0;
}
.sb-review-reject:hover { background: #fff0f4; }

/* 自助预约管理 - 子tab */
.sb-review-subtabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid #f0d5e0;
  padding-bottom: 0;
}
.sb-review-subtab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 18px;
  font-size: 14px;
  color: #8a4868;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.sb-review-subtab:hover { color: #4a1830; }
.sb-review-subtab.active {
  color: #c06080;
  border-bottom-color: #c06080;
  font-weight: 500;
}
.sb-sub-count {
  display: inline-block;
  min-width: 22px;
  padding: 1px 7px;
  background: #f0d5e0;
  color: #8a4868;
  border-radius: 10px;
  font-size: 11px;
  text-align: center;
  font-weight: 500;
}
.sb-review-subtab.active .sb-sub-count {
  background: #c06080;
  color: #fff;
}
.sb-review-subpane { display: none; }
.sb-review-subpane.active { display: block; }
.sb-processed-filter {
  margin-bottom: 14px;
}
.sb-processed-filter .form-control {
  max-width: 240px;
}

/* 已处理卡片 */
.sb-review-card-done {
  border-left-color: #c8c0c8 !important;
  background: #fafafa !important;
  opacity: 0.92;
}
.sb-review-result-pass { border-color: #4caf50; }
.sb-review-result-reject { border-color: #c06080; }
.sb-review-result-tag {
  margin-left: auto;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 10px;
  white-space: nowrap;
  font-weight: 500;
}
.sb-review-result-tag.sb-review-result-pass { background: #e8f5e9; color: #2e7d32; }
.sb-review-result-tag.sb-review-result-reject { background: #ffe0e8; color: #c06080; }
.sb-review-handle-time {
  margin-top: 8px;
  font-size: 11px;
  color: #a08898;
  border-top: 1px dashed #e8d0dc;
  padding-top: 6px;
}

/* 云端 ID 信息区 */
.sb-blob-info {
  margin-top: 16px;
  padding: 14px 16px;
  background: #fff8fb;
  border-radius: 10px;
  border: 1px solid #f0d5e0;
}
.sb-blob-info-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 4px 0;
}
.sb-blob-info-row.sb-blob-tip { align-items: flex-start; }
.sb-blob-label {
  font-size: 12px;
  color: #8a4868;
  white-space: nowrap;
}
.sb-blob-id {
  font-family: 'SFMono-Regular', 'Menlo', 'Consolas', monospace;
  font-size: 12px;
  background: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid #f0d5e0;
  color: #4a1830;
  word-break: break-all;
  flex: 1;
  min-width: 0;
  max-width: 320px;
}
.sb-blob-desc {
  font-size: 11px;
  color: #a08898;
  line-height: 1.6;
}
.sb-blob-desc code {
  background: #fff;
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 10px;
  border: 1px solid #f0d5e0;
}
.sb-btn-tiny {
  padding: 3px 10px !important;
  font-size: 11px !important;
}
.sb-btn-danger {
  border-color: #e8a8b8 !important;
  color: #c06080 !important;
  background: #fff0f4 !important;
}
.sb-btn-danger:hover {
  background: #ffe0e8 !important;
  border-color: #c06080 !important;
}

/* 兼容旧类（无实际使用，避免样式错乱） */
.sb-schedule-day,
.sb-schedule-items,
.sb-schedule-item { display: none; }

@media (max-width: 800px) {
  .sb-link-row { flex-direction: column; align-items: stretch; }
  .sb-link-row .sb-link-url { min-width: 0; }
  .sb-schedule-item { flex-wrap: wrap; gap: 6px; }
  .sb-schedule-time { min-width: auto; }
}
