/* ========================================
   美妆协同工作台 - 国风雅致主题
   （与登录页「宣纸国风」品牌统一：米白宣纸底 + 中国红 + 赭金）
   ======================================== */

/* ---- CSS 变量 ---- */
:root {
  --c-primary: #C0392B;
  --c-primary-light: #E2A79B;
  --c-primary-lighter: #F8EAE5;
  --c-primary-dark: #A93226;
  --c-gold: #C9A063;
  --c-gold-light: #E4CBA0;

  --c-bg: #F6F1E7;
  --c-bg-gray: #F0EAE0;
  --c-card: #FFFFFF;
  --c-text: #3A2E2A;
  --c-text-secondary: #7A6A60;
  --c-text-placeholder: #B3A598;
  --c-border: #E6DCCB;
  --c-border-light: #EFE8DA;

  --c-success: #5BAA8A;
  --c-success-bg: #E8F5EF;
  --c-warning: #E8A838;
  --c-warning-bg: #FFF5E5;
  --c-danger: #D45D5D;
  --c-danger-bg: #FDEAEA;
  --c-info: #6B9FD4;
  --c-info-bg: #E8F0FA;

  --gradient-primary: linear-gradient(135deg, #C0392B, #A93226);
  --gradient-primary-light: linear-gradient(135deg, #E2A79B, #E4CBA0);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --shadow-sm: 0 2px 8px rgba(120, 90, 60, 0.07);
  --shadow-md: 0 4px 16px rgba(120, 90, 60, 0.10);
  --shadow-lg: 0 8px 32px rgba(120, 90, 60, 0.14);

  --header-h: 52px;
  --nav-h: 56px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ---- Reset ---- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 14px;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

input, button, textarea, select {
  font-family: inherit;
  font-size: inherit;
  border: none;
  outline: none;
}

button { cursor: pointer; }
.hidden { display: none !important; }

/* ---- 滚动条 ---- */
::-webkit-scrollbar { width: 0; height: 0; }

/* ========================================
   登录页
   ======================================== */
.login-page {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F6F1E7;
  overflow: hidden;
  z-index: 100;
}

.login-footer {
  position: absolute;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  left: 0;
  right: 0;
  text-align: center;
  font-size: 11px;
}
.login-footer a {
  color: #A89A87;
  text-decoration: none;
}

/* ---- 备案信息（ICP + 公安联网备案）共用 ---- */
.footer-sep {
  margin: 0 5px;
  color: #A89A87;
}
.ga-link {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.ga-icon {
  width: 12px;
  height: 12px;
  margin-right: 3px;
  flex-shrink: 0;
}

.login-card {
  position: relative;
  z-index: 1;
  width: 88%;
  max-width: 360px;
  background: #FFFFFF;
  border: 1px solid #EDE4D4;
  border-radius: 20px;
  padding: 38px 26px 32px;
  box-shadow: 0 8px 32px rgba(120, 90, 60, 0.12);
  text-align: center;
}

.login-seal {
  position: absolute;
  top: 14px;
  right: 14px;
  height: 42px;
}

.login-wordmark {
  display: block;
  margin: 4px auto 14px;
  height: 64px;
}

.login-divider {
  width: 34px;
  height: 2px;
  background: #C0392B;
  margin: 0 auto 14px;
}

.login-title {
  font-family: 'KaiTi', 'STKaiti', 'SimSun', serif;
  font-size: 19px;
  font-weight: 700;
  color: #3A2E2A;
  letter-spacing: 5px;
}

.login-subtitle {
  font-size: 10px;
  color: #9A8A7C;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-top: 3px;
  margin-bottom: 26px;
}

.login-form {
  text-align: left;
}

.login-input {
  width: 100%;
  height: 46px;
  background: #FFFFFF;
  border: 1px solid #E2D8C8;
  border-radius: 10px;
  padding: 0 14px;
  font-size: 15px;
  color: #3A2E2A;
  margin-bottom: 12px;
  transition: border-color .2s;
}
.login-input::placeholder {
  color: #B9AC9B;
}
.login-input:focus {
  outline: none;
  border-color: #C0392B;
}

.btn-login {
  width: 100%;
  height: 48px;
  background: #C0392B;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  border-radius: 10px;
  letter-spacing: 6px;
  box-shadow: 0 4px 16px rgba(192, 57, 43, 0.25);
  transition: transform .15s, box-shadow .15s;
  margin-top: 8px;
}
.btn-login:active {
  transform: scale(0.97);
  box-shadow: 0 2px 8px rgba(192, 57, 43, 0.25);
}

/* ========================================
   主应用布局
   ======================================== */
.app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
  background: var(--c-bg);
  position: relative;
  box-shadow: 0 0 40px rgba(0,0,0,0.04);
}

/* ---- 顶部栏 ---- */
.app-header {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: #fff;
  border-bottom: 1px solid var(--c-border-light);
  flex-shrink: 0;
  z-index: 10;
}

.header-left, .header-right {
  min-width: 80px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.header-right { justify-content: flex-end; }

.header-center {
  font-size: 17px;
  font-weight: 600;
  color: var(--c-text);
  text-align: center;
}

.header-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--c-primary);
  background: var(--c-primary-lighter);
}
.header-btn:active { background: var(--c-primary-light); }

.store-selector {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 20px;
  background: var(--c-primary-lighter);
  font-size: 12px;
  color: var(--c-primary);
  font-weight: 500;
  white-space: nowrap;
}

/* 门店多选弹窗 */
.store-select-item {
  cursor: pointer;
  transition: background .15s;
}
.store-select-item:active {
  background: var(--c-bg);
}
.store-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #fff;
  flex-shrink: 0;
  transition: all .2s;
}
.store-check.checked {
  background: var(--c-primary);
  border-color: var(--c-primary);
}

/* ---- 内容区 ---- */
.app-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  position: relative;
}

.view {
  display: none;
  padding: 16px;
  padding-bottom: calc(var(--nav-h) + 24px + var(--safe-bottom));
  min-height: 100%;
  animation: fadeIn .3s ease;
}
.view.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- 底部导航 ---- */
.app-footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 3px 8px;
  font-size: 10px;
  color: #B9AFA3;
  background: transparent;
}
.app-footer a {
  color: inherit;
  text-decoration: none;
}

.bottom-nav {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: #fff;
  border-top: 1px solid var(--c-border-light);
  padding-bottom: var(--safe-bottom);
  flex-shrink: 0;
  z-index: 10;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--c-text-placeholder);
  font-size: 10px;
  transition: color .2s;
  padding-top: 4px;
}
.nav-item.active {
  color: var(--c-primary);
}
.nav-item:active { color: var(--c-primary-dark); }

/* ========================================
   通用组件
   ======================================== */

/* ---- 卡片 ---- */
.card {
  background: var(--c-card);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--c-text);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title-text {
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-title-text::before {
  content: '';
  width: 3px;
  height: 14px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

/* ---- 按钮 ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  transition: all .15s;
}
.btn:active { transform: scale(0.96); }

.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(192,57,43,0.25);
}
.btn-outline {
  background: #fff;
  color: var(--c-primary);
  border: 1.5px solid var(--c-primary-light);
}
.btn-ghost {
  background: var(--c-primary-lighter);
  color: var(--c-primary);
}
.btn-danger {
  background: var(--c-danger-bg);
  color: var(--c-danger);
}
.btn-sm {
  padding: 6px 14px;
  font-size: 12px;
}
.btn-block {
  width: 100%;
  height: 44px;
}

/* ---- 标签 ---- */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}
.tag-pending { background: var(--c-warning-bg); color: var(--c-warning); }
.tag-confirmed { background: var(--c-info-bg); color: var(--c-info); }
.tag-completed { background: var(--c-success-bg); color: var(--c-success); }
.tag-cancelled { background: var(--c-danger-bg); color: var(--c-danger); }
.tag-morning { background: #FFF3E0; color: #E8923C; }
.tag-afternoon { background: #E8F0FA; color: #6B9FD4; }
.tag-evening { background: #F3E8FA; color: #9B6BD4; }
.tag-fullday { background: var(--c-primary-lighter); color: var(--c-primary); }

/* ---- 空状态 ---- */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--c-text-placeholder);
}
.empty-state svg {
  margin-bottom: 12px;
  opacity: 0.5;
}
.empty-state p {
  font-size: 13px;
}

/* ---- Section 标题 ---- */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  margin-top: 4px;
}
.section-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--c-text);
}
.section-header .more {
  font-size: 12px;
  color: var(--c-text-secondary);
}

/* ========================================
   首页
   ======================================== */

/* 门店切换条 */
.store-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-bottom: 16px;
  padding: 2px 0;
  -webkit-overflow-scrolling: touch;
}
.store-chip {
  flex-shrink: 0;
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  background: #fff;
  color: var(--c-text-secondary);
  border: 1px solid var(--c-border);
  transition: all .2s;
}
.store-chip.active {
  background: var(--gradient-primary);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(192,57,43,0.25);
}

/* 首页日期快选条（今天为锚点，前2后4） */
.date-strip {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin-bottom: 14px;
  padding: 2px 0;
  -webkit-overflow-scrolling: touch;
}
.ds-chip {
  flex-shrink: 0;
  width: 52px;
  height: 58px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--c-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  position: relative;
  transition: transform .15s, background .15s;
}
.ds-chip:active { transform: scale(0.94); }
.ds-week { font-size: 10px; color: var(--c-text-secondary); line-height: 1; }
.ds-day { font-size: 17px; font-weight: 600; color: var(--c-text); line-height: 1.1; }
.ds-chip.is-today:not(.active) .ds-day { color: var(--c-primary); }
.ds-badge {
  position: absolute;
  top: 4px;
  right: 5px;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--c-primary);
  color: #fff;
  font-size: 10px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.ds-chip.active {
  background: var(--gradient-primary);
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(192,57,43,0.25);
}
.ds-chip.active .ds-week,
.ds-chip.active .ds-day { color: #fff; }
.ds-chip.active .ds-badge { background: #fff; color: var(--c-primary); }

/* 统计卡片网格 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.stat-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 16px 14px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.stat-card .stat-icon {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stat-card .stat-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--c-text);
  line-height: 1.2;
  margin-top: 8px;
}
.stat-card .stat-label {
  font-size: 12px;
  color: var(--c-text-secondary);
  margin-top: 4px;
}
.stat-card .stat-sub {
  font-size: 11px;
  color: var(--c-text-placeholder);
  margin-top: 2px;
}

/* 今日时间轴 */
.timeline {
  position: relative;
}
.timeline-item {
  display: flex;
  gap: 12px;
  padding-bottom: 16px;
  position: relative;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: 31px;
  top: 28px;
  bottom: 0;
  width: 2px;
  background: var(--c-border-light);
}
.timeline-item:last-child::before { display: none; }

.timeline-time {
  flex-shrink: 0;
  width: 50px;
  text-align: right;
  font-size: 12px;
  color: var(--c-text-secondary);
  padding-top: 2px;
}
.timeline-dot {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--c-primary);
  margin-top: 4px;
  border: 3px solid var(--c-primary-lighter);
  z-index: 1;
}
.timeline-dot.completed { background: var(--c-success); border-color: var(--c-success-bg); }
.timeline-dot.cancelled { background: var(--c-danger); border-color: var(--c-danger-bg); }

.timeline-content {
  flex: 1;
  background: var(--c-bg-gray);
  border-radius: var(--radius-md);
  padding: 10px 12px;
}
.timeline-content .tc-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--c-text);
}
.timeline-content .tc-info {
  font-size: 12px;
  color: var(--c-text-secondary);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* 快捷操作 */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.quick-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 4px;
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform .15s;
}
.quick-action:active { transform: scale(0.94); }
.quick-action .qa-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.quick-action span {
  font-size: 11px;
  color: var(--c-text-secondary);
}

/* ========================================
   排班管理
   ======================================== */
.shift-week-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  background: #fff;
  border-radius: var(--radius-md);
  padding: 8px 12px;
  box-shadow: var(--shadow-sm);
}
.shift-week-bar .week-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text);
}
.shift-week-nav {
  display: flex;
  gap: 6px;
}
.shift-week-nav button {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--c-bg-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-primary);
}

.shift-day {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
}
.shift-day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.shift-day-header .sdd-date {
  font-size: 14px;
  font-weight: 600;
}
.shift-day-header .sdd-date .weekday {
  font-size: 12px;
  font-weight: 400;
  color: var(--c-text-secondary);
  margin-left: 6px;
}
.shift-day-header .sdd-count {
  font-size: 11px;
  color: var(--c-text-placeholder);
}
.shift-day.today {
  border: 1.5px solid var(--c-primary-light);
}
.shift-day.today .sdd-date {
  color: var(--c-primary);
}

.shift-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--c-border-light);
}
.shift-item:first-of-type { border-top: none; }

.shift-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--gradient-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
}
.shift-info {
  flex: 1;
  min-width: 0;
}
.shift-info .si-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--c-text);
}
.shift-info .si-detail {
  font-size: 11px;
  color: var(--c-text-secondary);
  margin-top: 2px;
}
.shift-time {
  font-size: 12px;
  color: var(--c-text-secondary);
  text-align: right;
  flex-shrink: 0;
}

/* ========================================
   预约管理
   ======================================== */
.appt-filter-bar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin-bottom: 12px;
  padding: 2px 0;
}
.filter-chip {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 18px;
  font-size: 12px;
  background: #fff;
  color: var(--c-text-secondary);
  border: 1px solid var(--c-border);
}
.filter-chip.active {
  background: var(--c-primary-lighter);
  color: var(--c-primary);
  border-color: var(--c-primary-light);
  font-weight: 500;
}

.appt-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  border-left: 3px solid var(--c-primary-light);
}
.appt-card.status-pending { border-left-color: var(--c-warning); }
.appt-card.status-confirmed { border-left-color: var(--c-info); }
.appt-card.status-completed { border-left-color: var(--c-success); }
.appt-card.status-cancelled { border-left-color: var(--c-danger); opacity: 0.65; }

.appt-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.appt-card-header .ach-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--c-text);
}

.appt-card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.appt-info-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--c-text-secondary);
}
.appt-info-row svg { flex-shrink: 0; opacity: 0.6; }
.appt-info-row .label { color: var(--c-text-placeholder); width: 42px; flex-shrink: 0; }

.appt-card-footer {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--c-border-light);
}
.appt-card-footer .btn { flex: 1; }

/* ========================================
   日历视图
   ======================================== */
.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.calendar-header .cal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--c-text);
}
.cal-nav-group {
  display: flex;
  gap: 6px;
}
.cal-nav-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-primary);
  box-shadow: var(--shadow-sm);
}

.calendar-grid {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 12px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 14px;
}

.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 6px;
}
.cal-weekday {
  text-align: center;
  font-size: 11px;
  color: var(--c-text-placeholder);
  font-weight: 500;
  padding: 4px 0;
}

.cal-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.cal-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 13px;
  color: var(--c-text);
  position: relative;
  transition: all .15s;
}
.cal-day.other-month { color: var(--c-border); }
.cal-day.today {
  background: var(--c-primary-lighter);
  font-weight: 700;
  color: var(--c-primary);
}
.cal-day.selected {
  background: var(--gradient-primary);
  color: #fff;
  font-weight: 600;
}
.cal-day.has-events::after {
  content: '';
  position: absolute;
  bottom: 4px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--c-primary);
}
.cal-day.selected.has-events::after { background: #fff; }
.cal-day.selected.today::after { background: #fff; }

.cal-dots {
  position: absolute;
  bottom: 3px;
  display: flex;
  gap: 2px;
}
.cal-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
}

/* 日历门店筛选 */
.cal-store-filter {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin-bottom: 12px;
}

/* 日详情 */
.day-detail {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}
.day-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.day-detail-header h4 {
  font-size: 15px;
  font-weight: 600;
}

/* ========================================
   个人中心
   ======================================== */
.profile-header {
  background: var(--gradient-primary);
  border-radius: var(--radius-xl);
  padding: 24px 20px;
  margin-bottom: 16px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.profile-header::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
}
.profile-header::after {
  content: '';
  position: absolute;
  bottom: -40px;
  left: -20px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
}

.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.4);
  position: relative;
  z-index: 1;
}
.profile-name {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  position: relative;
  z-index: 1;
}
.profile-role {
  font-size: 12px;
  color: rgba(255,255,255,0.8);
  margin-top: 2px;
  position: relative;
  z-index: 1;
}

.profile-menu {
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}
.profile-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--c-border-light);
  transition: background .15s;
}
.profile-menu-item:last-child { border-bottom: none; }
.profile-menu-item:active { background: var(--c-bg-gray); }
.profile-menu-item .pmi-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.profile-menu-item .pmi-text {
  flex: 1;
  font-size: 14px;
  color: var(--c-text);
}
.profile-menu-item .pmi-arrow {
  color: var(--c-text-placeholder);
}

/* 数据量预警条（仅管理员，「我的」页顶部；v6.2 新增） */
.data-warning {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 12.5px;
  line-height: 1.55;
  border: 1px solid transparent;
  box-shadow: var(--shadow-sm);
}
.data-warning .dw-icon {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.data-warning .dw-body { flex: 1; }
.data-warning .dw-title {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 2px;
}
.data-warning.dw-yellow {
  background: var(--c-warning-bg);
  border-color: #F2DFB8;
  color: #8A6A2A;
}
.data-warning.dw-yellow .dw-icon {
  background: rgba(232,168,56,0.18);
  color: #B8821F;
}
.data-warning.dw-yellow .dw-title { color: #9C6F1D; }
.data-warning.dw-red {
  background: var(--c-danger-bg);
  border-color: #F2C9C9;
  color: #9A3B3B;
}
.data-warning.dw-red .dw-icon {
  background: rgba(212,93,93,0.16);
  color: var(--c-danger);
}
.data-warning.dw-red .dw-title { color: #B04A4A; }

/* ========================================
   弹窗
   ======================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(45,31,34,0.4);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn .2s ease;
}

.modal {
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  max-height: 85vh;
  overflow-y: auto;
  animation: slideUp .3s ease;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--c-border-light);
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}
.modal-header h3 {
  font-size: 17px;
  font-weight: 600;
}
.modal-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--c-bg-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-text-secondary);
  font-size: 18px;
}

.modal-body {
  padding: 20px;
}

/* ---- 表单 ---- */
.form-group {
  margin-bottom: 16px;
}
.form-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--c-text);
  margin-bottom: 6px;
  display: block;
}
.form-label .required {
  color: var(--c-danger);
  margin-left: 2px;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  height: 44px;
  background: var(--c-bg-gray);
  border-radius: var(--radius-md);
  padding: 0 14px;
  font-size: 14px;
  color: var(--c-text);
  border: 1.5px solid transparent;
  transition: all .2s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--c-primary-light);
  background: #fff;
}
.form-textarea {
  height: auto;
  padding: 12px 14px;
  resize: none;
  min-height: 80px;
}
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23B76E79' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.form-row {
  display: flex;
  gap: 10px;
}
.form-row .form-group {
  flex: 1;
}

.form-actions {
  display: flex;
  gap: 10px;
  padding-top: 8px;
}
.form-actions .btn { flex: 1; }

/* ---- 时间段选择 ---- */
.time-slot-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.time-slot {
  padding: 8px;
  border-radius: var(--radius-sm);
  background: var(--c-bg-gray);
  text-align: center;
  font-size: 12px;
  color: var(--c-text-secondary);
  border: 1.5px solid transparent;
  transition: all .15s;
}
.time-slot.active {
  background: var(--c-primary-lighter);
  color: var(--c-primary);
  border-color: var(--c-primary-light);
  font-weight: 600;
}

/* ========================================
   Toast
   ======================================== */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(45,31,34,0.85);
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 14px;
  z-index: 999;
  backdrop-filter: blur(10px);
  animation: toastIn .3s ease;
  max-width: 80%;
  text-align: center;
}
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, -45%); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}

/* ========================================
   滚动加载提示
   ======================================== */
.scroll-tip {
  text-align: center;
  padding: 16px;
  font-size: 12px;
  color: var(--c-text-placeholder);
}

/* ========================================
   搜索框
   ======================================== */
.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border-radius: var(--radius-md);
  padding: 0 14px;
  height: 40px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}
.search-box input {
  flex: 1;
  background: transparent;
  font-size: 13px;
  color: var(--c-text);
}
.search-box input::placeholder { color: var(--c-text-placeholder); }

/* ========================================
   排班 - 员工筛选
   ======================================== */
.filter-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  align-items: center;
}
.filter-select {
  flex: 1;
  height: 36px;
  background: #fff;
  border-radius: var(--radius-sm);
  border: 1px solid var(--c-border);
  padding: 0 10px;
  font-size: 12px;
  color: var(--c-text-secondary);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 12 8'%3E%3Cpath fill='%238A7074' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
}

/* ========================================
   日历日详情 - 预约项
   ======================================== */
.day-appt-item {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--c-border-light);
}
.day-appt-item:last-child { border-bottom: none; }
.day-appt-time {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--c-primary);
  width: 48px;
  padding-top: 2px;
}
.day-appt-info {
  flex: 1;
}
.day-appt-info .dai-name {
  font-size: 14px;
  font-weight: 500;
}
.day-appt-info .dai-detail {
  font-size: 12px;
  color: var(--c-text-secondary);
  margin-top: 2px;
}

/* FAB 浮动按钮 */
.fab {
  position: absolute;
  bottom: calc(var(--nav-h) + 20px + var(--safe-bottom));
  right: 20px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(192,57,43,0.35);
  z-index: 50;
  transition: transform .15s;
}
.fab:active { transform: scale(0.9); }

/* 响应式微调 */
/* 管理弹窗新增区域 */
.mgmt-add-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--c-border-light);
}
.mgmt-add-section h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--c-text);
}

/* 删除按钮 */
.btn-icon-danger {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--c-danger-bg);
  color: var(--c-danger);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all .15s;
}
.btn-icon-danger:active { transform: scale(0.9); }

/* 待指派标签 */
.tag-unassigned {
  background: #FFF0E6;
  color: #E8923C;
}

/* 指派按钮 */
.btn-assign {
  background: var(--c-primary-lighter);
  color: var(--c-primary);
  border: 1px solid var(--c-primary-light);
}

/* 时间选择器行 */
.time-select-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.time-select-row .form-group {
  flex: 1;
}
.time-colon {
  font-size: 18px;
  color: var(--c-text-secondary);
  padding-bottom: 12px;
}

/* 管理列表项 */
.mgmt-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--c-border-light);
}
.mgmt-list-item:last-child { border-bottom: none; }
.mgmt-list-item .mli-info {
  flex: 1;
  min-width: 0;
}
.mgmt-list-item .mli-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--c-text);
}
.mgmt-list-item .mli-sub {
  font-size: 11px;
  color: var(--c-text-secondary);
  margin-top: 2px;
}

@media (max-width: 360px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .stat-card { padding: 12px 10px; }
  .stat-card .stat-value { font-size: 22px; }
  .quick-actions { gap: 6px; }
}

/* ===== 化妆师多选 ===== */
.artist-multi-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 0;
}
.artist-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--c-border-light);
  background: var(--c-bg);
  font-size: 13px;
  color: var(--c-text-secondary);
  cursor: pointer;
  transition: all .15s;
}
.artist-chip.selected {
  border-color: var(--c-primary);
  background: var(--c-primary-lighter);
  color: var(--c-primary);
  font-weight: 500;
}
.artist-chip .check-mark {
  width: 16px; height: 16px;
  display: none;
}
.artist-chip.selected .check-mark { display: inline-block; }

/* 多化妆师标签 */
.artist-tags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
}
.artist-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--c-primary-lighter);
  color: var(--c-primary);
  font-size: 11px;
  font-weight: 500;
}
.artist-tag.unassigned {
  background: var(--c-warning-bg);
  color: var(--c-warning);
}

/* ===== 预约管理筛选条 ===== */
.appt-filter-bar-v2 {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.appt-filter-bar-v2::-webkit-scrollbar { display: none; }
.filter-chip-v2 {
  flex-shrink: 0;
  padding: 5px 12px;
  border-radius: 14px;
  background: var(--c-bg);
  border: 1px solid var(--c-border-light);
  font-size: 12px;
  color: var(--c-text-secondary);
  white-space: nowrap;
  cursor: pointer;
  transition: all .15s;
}
.filter-chip-v2.active {
  background: var(--c-primary);
  color: #fff;
  border-color: var(--c-primary);
}
.filter-chip-v2.unassigned-tag {
  background: var(--c-warning-bg);
  color: var(--c-warning);
  border-color: var(--c-warning);
}
.filter-chip-v2.unassigned-tag.active {
  background: var(--c-warning);
  color: #fff;
}

.appt-filter-row {
  display: flex;
  gap: 8px;
  padding: 6px 0;
  align-items: center;
}
.appt-filter-row select {
  flex: 1;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--c-border-light);
  font-size: 12px;
  background: var(--c-bg);
  color: var(--c-text);
  min-width: 0;
}

/* ===== 操作日志 ===== */
.log-list {
  padding: 0;
}
.log-item {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  background: var(--c-bg-card);
  border-radius: 10px;
  margin-bottom: 8px;
  border-left: 3px solid var(--c-primary);
}
.log-item.log-create { border-left-color: var(--c-success); }
.log-item.log-delete { border-left-color: var(--c-danger); }
.log-item.log-modify { border-left-color: var(--c-warning); }
.log-icon {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 12px;
}
.log-icon.log-create { background: var(--c-success-bg); color: var(--c-success); }
.log-icon.log-delete { background: var(--c-danger-bg); color: var(--c-danger); }
.log-icon.log-modify { background: var(--c-warning-bg); color: var(--c-warning); }
.log-content {
  flex: 1;
  min-width: 0;
}
.log-action {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text);
  margin-bottom: 2px;
}
.log-detail {
  font-size: 12px;
  color: var(--c-text-secondary);
  line-height: 1.5;
}
.log-time {
  font-size: 11px;
  color: var(--c-text-placeholder);
  margin-top: 4px;
}

/* 日志筛选 */
.log-filter-card {
  background: linear-gradient(135deg, #FAF3E8 0%, #FFFCF5 100%);
  border: 1.5px solid var(--c-primary-light);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(120,90,60,0.08);
}
.log-filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.log-filter-group + .log-filter-group {
  margin-top: 10px;
}
.log-filter-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--c-primary);
  letter-spacing: 0.5px;
}
.log-filter-inputs {
  display: flex;
  align-items: center;
  gap: 6px;
}
.log-date-box {
  flex: 1;
  min-width: 0;
  position: relative;
  display: flex;
  align-items: center;
  height: 36px;
  padding: 0 10px;
  background: #fff;
  border: 1.5px solid var(--c-border-light);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color .15s;
}
.log-date-box:active {
  border-color: var(--c-primary);
}
.log-date-text {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: var(--c-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.log-date-text.placeholder {
  color: var(--c-text-placeholder);
  font-weight: 400;
}
.log-date-box input[type="date"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  border: none;
  z-index: 1;
}
.log-date-sep {
  font-size: 13px;
  color: var(--c-text-placeholder);
  flex-shrink: 0;
}
.log-date-clear {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--c-border);
  color: #fff;
  font-size: 11px;
  z-index: 2;
  position: relative;
  cursor: pointer;
}
.log-filter-clear-all {
  margin-top: 10px;
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  color: var(--c-primary);
  padding: 8px;
  border-radius: var(--radius-md);
  background: rgba(192,57,43,0.08);
  cursor: pointer;
  transition: background .15s;
}
.log-filter-clear-all:active {
  background: rgba(192,57,43,0.15);
}

/* ===== 化妆师分组色块布局 ===== */
.artist-group-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.artist-group {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1.5px solid var(--ag-color, var(--c-primary));
  border-left-width: 4px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.artist-group.unassigned {
  border-color: #E8923C;
  border-left-color: #E8923C;
  background: #FFFBF5;
}
/* 协同预约组 - 渐变边框，视觉最强 */
.artist-group.multi {
  border: 2px solid transparent;
  border-left-width: 5px;
  background-image: linear-gradient(#fff, #fff), var(--gradient-primary);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  box-shadow: 0 2px 10px rgba(192,57,43,0.15);
}
.artist-group.multi .multi-header {
  background: var(--gradient-primary);
  gap: 7px;
}
.artist-group.multi .ag-name { font-size: 15px; }
/* 协同预约内每位化妆师标签 */
.ag-artists {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 5px;
}
.ag-artist-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  padding: 2px 10px;
  border-radius: 12px;
  line-height: 1.4;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}
.multi-item .ag-store { font-size: 13px; }
.ag-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--ag-color, var(--c-primary));
  color: #fff;
}
.artist-group.unassigned .ag-header {
  background: #E8923C;
}
.ag-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  flex-shrink: 0;
  opacity: 0.9;
}
.ag-name {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
.ag-collab {
  font-size: 10px;
  opacity: 0.8;
  margin-left: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}
.ag-count {
  font-size: 11px;
  opacity: 0.85;
  margin-left: auto;
  flex-shrink: 0;
  background: rgba(255,255,255,0.2);
  padding: 1px 8px;
  border-radius: 10px;
}
.ag-items {
  padding: 4px 0;
}
.ag-item {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--c-border-lighter, #F5F0F1);
  cursor: pointer;
  transition: background .12s;
}
.ag-item:last-child { border-bottom: none; }
.ag-item:active { background: var(--c-bg-gray); }
.ag-time {
  flex-shrink: 0;
  width: 42px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ag-color, var(--c-primary));
  padding-top: 1px;
  text-align: center;
}
.artist-group.unassigned .ag-time { color: #E8923C; }
.ag-body {
  flex: 1;
  min-width: 0;
}
.ag-store {
  font-size: 14px;
  font-weight: 600;
  color: var(--c-text);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 3px;
}
.ag-store .store-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.ag-people {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--c-primary);
  background: var(--c-primary-lighter);
  padding: 1px 8px;
  border-radius: 10px;
  margin-bottom: 4px;
}
.ag-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  font-size: 11px;
  color: var(--c-text-secondary);
}
.ag-meta .ag-service {
  color: var(--c-text);
  font-weight: 500;
}
.ag-meta .ag-service-onsite {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(135deg, #FFE4D0 0%, #FFD0B0 100%);
  color: #C8410A;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 8px;
  font-size: 11px;
  border: 1px solid rgba(255, 138, 61, 0.4);
}
.ag-meta .ag-service-onsite::before {
  content: "🏠";
  font-size: 9px;
  margin-right: 2px;
}
.ag-meta .ag-extra-artists {
  color: var(--ag-color, var(--c-primary));
  font-weight: 500;
}
.ag-meta .ag-req {
  color: var(--c-text-secondary);
}
.ag-meta .ag-deposit {
  color: var(--c-primary);
  font-weight: 600;
}

/* ===== 定金统计 ===== */
.deposit-summary {
  background: var(--gradient-primary);
  border-radius: 14px;
  padding: 20px;
  color: #fff;
  text-align: center;
  margin-bottom: 16px;
}
.deposit-summary .ds-amount {
  font-size: 28px;
  font-weight: 700;
}
.deposit-summary .ds-label {
  font-size: 13px;
  opacity: 0.9;
  margin-top: 4px;
}
.deposit-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: var(--c-bg-card);
  border-radius: 10px;
  margin-bottom: 8px;
}
.deposit-list-item .dli-date {
  font-size: 14px;
  font-weight: 500;
  color: var(--c-text);
}
.deposit-list-item .dli-count {
  font-size: 11px;
  color: var(--c-text-secondary);
  margin-top: 2px;
}
.deposit-list-item .dli-amount {
  font-size: 16px;
  font-weight: 700;
  color: var(--c-primary);
}

/* ===== 图片生成按钮 ===== */
.gen-img-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  background: var(--c-primary-lighter);
  color: var(--c-primary);
  border: 1px dashed var(--c-primary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 12px;
  transition: all .15s;
}
.gen-img-btn:active { transform: scale(0.98); }

/* ===== 创建信息展示 ===== */
.create-info-box {
  background: var(--c-bg-gray);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--c-text-secondary);
}
.create-info-box .ci-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}
.create-info-box .ci-row:last-child { margin-bottom: 0; }
.create-info-box .ci-label { color: var(--c-text-placeholder); }

/* 日期范围筛选 */
.date-range-bar {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 8px 0;
  margin-bottom: 4px;
}
.date-range-bar input[type="date"] {
  flex: 1;
  min-width: 0;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--c-border-light);
  font-size: 12px;
  background: var(--c-bg);
  color: var(--c-text);
}
.date-range-bar .dr-sep {
  font-size: 12px;
  color: var(--c-text-placeholder);
}
.date-range-bar .dr-btn {
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--c-primary);
  color: #fff;
  font-size: 12px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

/* ===== 预约管理 - 工具栏单行布局 ===== */
.appt-toolbar-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.date-filter-box {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
  background: #fff;
  border: 1.5px solid var(--c-primary-light);
  border-radius: var(--radius-md);
  padding: 0 10px;
  height: 36px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: border-color .15s;
}
.date-filter-box:active { border-color: var(--c-primary); }
.date-filter-box .date-text {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: var(--c-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.date-filter-box .date-text.placeholder {
  color: var(--c-text-placeholder);
  font-weight: 400;
}
.date-filter-box input[type="date"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  border: none;
  z-index: 1;
}
.date-filter-box .date-clear {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--c-border);
  color: #fff;
  font-size: 11px;
  z-index: 2;
  position: relative;
}
/* 工具栏内的筛选标签 */
.appt-toolbar-row .filter-chip-v2 {
  flex-shrink: 0;
  padding: 5px 10px;
  height: 36px;
  display: flex;
  align-items: center;
  border-radius: 10px;
}
/* 生成图片图标按钮 */
.gen-img-icon-btn {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--c-primary-lighter);
  color: var(--c-primary);
  border: 1px dashed var(--c-primary);
  cursor: pointer;
  transition: all .15s;
}
.gen-img-icon-btn:active { transform: scale(0.92); }

/* ===== 门店筛选标签栏 ===== */
.store-filter-bar {
  display: flex;
  gap: 6px;
  padding: 4px 0 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.store-filter-bar::-webkit-scrollbar { display: none; }
.store-chip {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 16px;
  background: #fff;
  border: 1.5px solid var(--c-border-light);
  font-size: 12px;
  font-weight: 500;
  color: var(--c-text-secondary);
  white-space: nowrap;
  cursor: pointer;
  transition: all .15s;
}
.store-chip .sc-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.store-chip.active {
  background: var(--c-primary-lighter);
  border-color: var(--c-primary);
  color: var(--c-primary);
  font-weight: 600;
}
.store-chip:active { transform: scale(0.96); }

/* ===== 门店多选下拉按钮（卡项管理） ===== */
.store-multi-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1.15;
  min-width: 0;
  height: 36px;
  padding: 0 10px;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--c-text-secondary);
  cursor: pointer;
  transition: all .15s;
}
.store-multi-btn svg { color: var(--c-text-placeholder); }
.store-multi-btn .smb-text { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.store-multi-btn .smb-caret { font-size: 10px; color: var(--c-text-placeholder); }
.store-multi-btn.has-sel {
  border-color: var(--c-primary);
  color: var(--c-primary);
  background: var(--c-primary-lighter);
  font-weight: 600;
}
.store-multi-btn.has-sel svg,
.store-multi-btn.has-sel .smb-caret { color: var(--c-primary); }
.store-multi-btn:active { transform: scale(0.98); }

/* ===== 紧凑预约卡片 ===== */
.appt-card-compact {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-bottom: 7px;
  box-shadow: var(--shadow-sm);
  border-left: 3px solid var(--c-primary-light);
  cursor: pointer;
  transition: background .12s;
}
.appt-card-compact:active { background: var(--c-bg-gray); }
.appt-card-compact.pending { border-left-color: var(--c-warning); }
.appt-card-compact.multi { border-left-color: var(--c-primary); }

/* 卡片标题：时间 + 门店 */
.acc-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.acc-date {
  font-size: 15px;
  font-weight: 700;
  color: var(--c-text);
  letter-spacing: 0.5px;
}
.acc-store {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.acc-store .acc-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.acc-badge {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  background: var(--c-warning);
  padding: 2px 8px;
  border-radius: 10px;
}

/* 卡片内容区 */
.acc-body { }
.ac-compact-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}
.ac-tag {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 500;
}
.ac-people {
  background: var(--c-primary-lighter);
  color: var(--c-primary);
  font-weight: 600;
}
.ac-service {
  background: var(--c-bg-gray);
  color: var(--c-text-secondary);
}
.ac-service-onsite {
  background: linear-gradient(135deg, #FF8A3D 0%, #FF6B1A 100%);
  color: #FFFFFF;
  font-weight: 600;
  padding: 3px 10px;
  box-shadow: 0 2px 4px rgba(255, 107, 26, 0.3);
}
.ac-service-onsite::before {
  content: "🏠";
  font-size: 10px;
  margin-right: 3px;
  filter: grayscale(0.2);
}
.ac-deposit {
  background: #FFF5E6;
  color: #C8800C;
  font-weight: 600;
}
.ac-unassigned {
  background: #FFF3E8;
  color: var(--c-warning);
  font-weight: 600;
}
.ac-artist-mini {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  padding: 2px 8px;
  border-radius: 10px;
  line-height: 1.4;
}
.ac-req {
  font-size: 12px;
  color: var(--c-text-secondary);
  margin-top: 4px;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* 紧凑卡片指派按钮 */
.acc-action {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--c-border-lighter);
}
.btn-assign-mini {
  width: 100%;
  padding: 6px;
  border-radius: var(--radius-sm);
  background: var(--c-warning);
  color: #fff;
  border: none;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}
.btn-assign-mini:active { opacity: 0.85; }

/* 保存按钮防抖：保存中禁用态 */
.btn:disabled {
  opacity: 0.6;
  pointer-events: none;
}

/* ========================================
   卡项模块（私教课 + 次卡）
   ======================================== */

/* 首页入口卡 */
.pass-entry-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
  border-left: 3px solid var(--c-primary);
  cursor: pointer;
  transition: transform .15s;
}
.pass-entry-card:active { transform: scale(0.98); }
.pass-entry-card .pec-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--c-text);
}
.pass-entry-card .pec-sub {
  font-size: 11px;
  color: var(--c-text-secondary);
  margin-top: 3px;
}
.pass-entry-card .pec-arrow {
  font-size: 20px;
  color: var(--c-primary);
  flex-shrink: 0;
}

/* Tab 切换 */
.pass-tabs {
  display: flex;
  gap: 18px;
  margin-bottom: 12px;
}
.pass-tab {
  font-size: 15px;
  color: var(--c-text-secondary);
  padding-bottom: 6px;
  cursor: pointer;
}
.pass-tab.active {
  color: var(--c-primary);
  font-weight: 600;
  border-bottom: 2px solid var(--c-primary);
}

/* 顶部统计卡 */
.pass-summary {
  background: var(--gradient-primary);
  border-radius: var(--radius-lg);
  padding: 16px;
  color: #fff;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}
.pass-summary .ps-label { font-size: 12px; opacity: 0.9; }
.pass-summary .ps-num {
  font-size: 26px;
  font-weight: 700;
  margin-top: 4px;
  line-height: 1.3;
}
.pass-summary .ps-eq { font-size: 13px; font-weight: 500; opacity: 0.92; }
.pass-summary .ps-sub { font-size: 11px; opacity: 0.85; margin-top: 4px; }
.pass-artist-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.pass-artist-chip {
  font-size: 11px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.4);
  color: #fff;
  border-radius: 12px;
  padding: 2px 10px;
  cursor: pointer;
  transition: all .15s;
}
.pass-artist-chip.active {
  background: #fff;
  color: var(--c-primary);
  font-weight: 600;
  border-color: #fff;
}

/* 卡项卡片 */
.pass-card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
  border-left: 3px solid var(--c-primary-light);
  cursor: pointer;
  transition: background .12s;
}
.pass-card:active { background: var(--c-bg-gray); }
.pass-card-dim { opacity: 0.72; }
.pc-header {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pc-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--c-text);
  flex-shrink: 0;
}
.pc-phone {
  font-size: 12px;
  color: var(--c-text-placeholder);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.btn-consume {
  flex-shrink: 0;
  background: var(--c-primary);
  color: #fff;
  border: none;
  font-size: 12px;
  font-weight: 500;
  padding: 5px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity .15s;
}
.btn-consume:active { opacity: 0.85; }
.btn-consume:disabled { opacity: 0.5; pointer-events: none; }
.pc-sub {
  font-size: 12px;
  color: var(--c-text-secondary);
  margin-top: 4px;
  line-height: 1.5;
}
.pc-progress {
  height: 5px;
  background: var(--c-bg-gray);
  border-radius: 3px;
  margin-top: 8px;
  overflow: hidden;
}
.pc-progress i {
  display: block;
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 3px;
}
.pc-remain {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: var(--c-primary);
  margin-top: 6px;
}
.pc-status {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  flex-shrink: 0;
}
.pc-status.active { background: var(--c-success-bg); color: var(--c-success); }
.pc-status.finished { background: var(--c-bg-gray); color: var(--c-text-placeholder); }
.pc-status.refunded { background: var(--c-danger-bg); color: var(--c-danger); }
.pass-value-tag {
  display: inline-block;
  background: #FFF5E6;
  color: #C8800C;
  padding: 1px 8px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 11px;
}

/* ===== 课程等级 / 次卡账户标签 ===== */
.pc-level {
  display: inline-block;
  background: var(--c-primary-lighter);
  color: var(--c-primary);
  padding: 1px 7px;
  border-radius: 9px;
  font-weight: 600;
  font-size: 11px;
}
.pc-count-tag {
  display: inline-block;
  background: #EAF3FF;
  color: #2E7BD4;
  padding: 1px 7px;
  border-radius: 9px;
  font-weight: 600;
  font-size: 11px;
}
.pc-amount-tag {
  display: inline-block;
  background: var(--c-bg-gray);
  color: var(--c-text-secondary);
  padding: 1px 7px;
  border-radius: 9px;
  font-size: 11px;
}
.phone-lookup-hint {
  margin-top: 5px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--c-success);
}
.phone-lookup-hint:empty { display: none; }
.phone-lookup-hint .link-edit {
  color: var(--c-primary);
  text-decoration: underline;
  cursor: pointer;
  font-weight: 600;
}

/* ===== 自定义确认弹窗 ===== */
.confirm-msg {
  font-size: 14px;
  color: var(--c-text);
  line-height: 1.6;
  margin-bottom: 12px;
}
.confirm-tip {
  font-size: 12px;
  color: var(--c-text-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
  padding: 8px 10px;
  background: var(--c-primary-lighter);
  border-radius: var(--radius-sm);
}

/* ===== 档案姓名选择（售卡 / 补录手机号共用） ===== */
.name-choice-box {
  margin-top: 8px;
  padding: 9px 10px;
  background: #FFF8E6;
  border: 1px solid #F2D9A0;
  border-radius: var(--radius-sm);
}
.ncb-title {
  font-size: 12px;
  color: #8A6116;
  font-weight: 600;
  margin-bottom: 7px;
}
.ncb-opts {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ncb-opt {
  display: block;
  padding: 7px 10px;
  background: #fff;
  border: 1px solid #E8D2A8;
  border-radius: 8px;
  font-size: 12px;
  color: #8A6116;
  cursor: pointer;
  transition: all .15s;
}
.ncb-opt.active {
  background: var(--c-primary);
  border-color: var(--c-primary);
  color: #fff;
  font-weight: 600;
}
.ncb-tip {
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.4;
  color: #8A6116;
}
.phone-warn {
  margin-top: 6px;
  padding: 7px 9px;
  background: #FFF8E6;
  border: 1px solid #F2D9A0;
  border-radius: var(--radius-sm);
  font-size: 11px;
  line-height: 1.5;
  color: #8A6116;
}
.plh-sub {
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--c-text-secondary);
}

/* ===== 缺手机号提示 / 补录入口 ===== */
.pc-nophone {
  display: inline-block;
  background: var(--c-danger-bg);
  color: var(--c-danger);
  padding: 1px 7px;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 600;
}
.pass-fix-tag {
  display: inline-block;
  margin-left: 6px;
  background: #FFF1F0;
  color: var(--c-danger);
  border: 1px dashed var(--c-danger);
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.pass-warn-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 12px 10px;
  padding: 9px 12px;
  background: #FFF8E6;
  border: 1px solid #F2D9A0;
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: #8A6116;
  line-height: 1.4;
  cursor: pointer;
}
.pass-warn-bar .pwb-action {
  flex-shrink: 0;
  color: #C8800C;
  font-weight: 600;
}
.field-tip {
  margin-top: 5px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--c-text-placeholder);
}

/* ===== 次卡账户详情 ===== */
.acc-section-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--c-text-secondary);
  margin: 14px 0 8px;
}
.acc-card-list { border: 1px solid var(--c-border-light); border-radius: var(--radius-md); overflow: hidden; }
.acc-card-row {
  padding: 10px 12px;
  border-bottom: 1px solid var(--c-border-light);
  background: #fff;
}
.acc-card-row:last-child { border-bottom: none; }
.acc-row-main { display: flex; flex-direction: column; gap: 2px; }
.acc-store { font-size: 13px; font-weight: 600; color: var(--c-text); }
.acc-sold-tag {
  display: inline-block;
  background: var(--c-primary-lighter);
  color: var(--c-primary);
  font-size: 10px;
  font-weight: 500;
  padding: 0 5px;
  border-radius: 8px;
  margin-left: 4px;
  vertical-align: 1px;
}
.acc-meta { font-size: 11px; color: var(--c-text-placeholder); }
.acc-row-right { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.acc-remain { font-size: 13px; font-weight: 600; color: var(--c-primary); }
.acc-status { font-size: 11px; padding: 1px 7px; border-radius: 9px; }
.acc-status.st-active { background: var(--c-success-bg); color: var(--c-success); }
.acc-status.st-finished { background: var(--c-bg-gray); color: var(--c-text-placeholder); }
.acc-status.st-refunded { background: var(--c-danger-bg); color: var(--c-danger); }
.acc-row-actions { display: flex; gap: 8px; margin-top: 8px; }
.btn-mini {
  flex: 1;
  height: 30px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--c-border);
  background: #fff;
  color: var(--c-text-secondary);
  font-size: 12px;
  cursor: pointer;
}
.btn-mini-primary {
  border-color: var(--c-primary);
  color: #fff;
  background: var(--c-primary);
  font-weight: 600;
}
.btn-mini-danger {
  border-color: #F0C8C2;
  color: var(--c-danger);
  background: #FFF6F5;
  font-weight: 600;
  flex: 0 0 auto;
  padding: 0 12px;
}

/* 状态筛选视图提示条（已用完/已退卡/全部：仅追溯，不计入统计） */
.pass-view-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #FFF9EC;
  border: 1px solid #F5E3BE;
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  margin: 10px 0;
  font-size: 11px;
  color: #9A7418;
  line-height: 1.5;
}

/* 搜索命中的卡被状态筛选隐藏时的提示 */
.pass-cross-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #F5F6F8;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  margin: 10px 0;
  font-size: 11px;
  color: var(--c-text-secondary);
  cursor: pointer;
}
.pass-cross-hint .pwb-action {
  color: var(--c-primary);
  font-weight: 600;
  white-space: nowrap;
}

/* 退卡后详情页的保留说明条 */
.pass-retain-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #FDF2F0;
  border: 1px solid #F3D6D1;
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  margin: 10px 0 0;
  font-size: 11px;
  color: #A8442F;
  line-height: 1.5;
}
.pass-retain-bar .pwb-action {
  color: var(--c-primary);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.acc-log-list { border: 1px solid var(--c-border-light); border-radius: var(--radius-md); overflow: hidden; }
.acc-log-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--c-border-light);
  background: #fff;
}
.acc-log-row:last-child { border-bottom: none; }
.acc-log-left { width: 62px; flex-shrink: 0; }
.acc-log-type { font-size: 11px; font-weight: 600; color: var(--c-primary); }
.acc-log-type.t-consume { color: var(--c-primary); }
.acc-log-type.t-undo, .acc-log-type.t-refund { color: var(--c-danger); }
.acc-log-type.t-adjust, .acc-log-type.t-rebind { color: #C8800C; }
.acc-log-date { font-size: 10px; color: var(--c-text-placeholder); }
.acc-log-mid { flex: 1; min-width: 0; }
.acc-log-main { font-size: 12px; color: var(--c-text); }
.acc-log-sub { font-size: 10px; color: var(--c-text-placeholder); margin-top: 2px; }
.acc-log-right { flex-shrink: 0; }
.acc-log-del { font-size: 11px; color: var(--c-danger); cursor: pointer; }
.acc-empty { padding: 14px; text-align: center; font-size: 12px; color: var(--c-text-placeholder); background: #fff; }

/* ===== 选卡扣次 ===== */
.picker-hint {
  font-size: 12px;
  color: var(--c-text-secondary);
  margin-bottom: 10px;
  line-height: 1.5;
}
.picker-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  background: #fff;
  border: 1px solid var(--c-border-light);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  cursor: pointer;
}
.picker-row:active { background: var(--c-bg-gray); }
.picker-main { min-width: 0; }
.picker-title { font-size: 13px; font-weight: 600; color: var(--c-text); }
.picker-sub { font-size: 11px; color: var(--c-text-placeholder); margin-top: 2px; }
.picker-right {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--c-text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
}
.picker-right b { color: var(--c-primary); font-size: 15px; }
.picker-arrow { color: var(--c-text-placeholder); }

/* 售卡表单：类型切换 + 套餐卡片 */
.pass-type-seg {
  display: flex;
  background: var(--c-bg-gray);
  border-radius: var(--radius-md);
  padding: 3px;
  margin-bottom: 14px;
}
.pass-type-seg span {
  flex: 1;
  text-align: center;
  font-size: 14px;
  padding: 8px 0;
  border-radius: 9px;
  color: var(--c-text-secondary);
  cursor: pointer;
  transition: all .15s;
}
.pass-type-seg span.active {
  background: var(--gradient-primary);
  color: #fff;
  font-weight: 600;
}
.pkg-cards {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.pkg-card {
  flex: 1;
  border: 1.5px solid var(--c-border-light);
  border-radius: var(--radius-md);
  background: var(--c-bg);
  text-align: center;
  padding: 10px 4px;
  cursor: pointer;
  transition: all .15s;
}
.pkg-card.selected {
  border-color: var(--c-primary);
  background: var(--c-primary-lighter);
}
.pkg-card .pk-price {
  font-size: 13px;
  font-weight: 700;
  color: var(--c-primary);
}
.pkg-card .pk-desc {
  font-size: 10px;
  color: var(--c-text-secondary);
  margin-top: 4px;
  line-height: 1.5;
}

/* 扣次确认弹窗 */
.consume-summary {
  background: var(--c-bg-gray);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 14px;
}
.consume-summary .cs-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--c-text);
}
.consume-summary .cs-remain {
  font-size: 12px;
  color: var(--c-primary);
  font-weight: 600;
  margin-top: 3px;
}
.stepper-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 6px 0 2px;
}
.stepper-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--c-bg-gray);
  border: 1px solid var(--c-border-light);
  font-size: 18px;
  color: var(--c-text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
}
.stepper-btn:active { background: var(--c-primary-lighter); color: var(--c-primary); }
.stepper-val {
  font-size: 20px;
  font-weight: 700;
  color: var(--c-primary);
  min-width: 76px;
  text-align: center;
}
.consume-after-hint {
  font-size: 12px;
  color: var(--c-text-secondary);
  text-align: center;
  margin-bottom: 8px;
  min-height: 18px;
}

/* 核销流水时间线 */
.pass-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.pass-detail-actions .btn {
  flex: 1;
  min-width: 100px;
  padding: 9px 6px;
  font-size: 13px;
}
.pass-timeline {
  border-left: 2px solid var(--c-border);
  margin: 10px 0 4px 6px;
  padding-left: 14px;
}
.pass-timeline-item {
  position: relative;
  padding-bottom: 12px;
  font-size: 12px;
  color: var(--c-text-secondary);
  line-height: 1.6;
}
.pass-timeline-item:last-child { padding-bottom: 4px; }
.pass-timeline-item::before {
  content: '';
  position: absolute;
  left: -19px;
  top: 5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-primary-light);
}
.pti-title { font-weight: 600; }
.pti-del {
  color: var(--c-danger);
  cursor: pointer;
  font-size: 11px;
  margin-left: 8px;
  font-weight: 500;
}

/* ===== 次卡类型（日常妆 / 风格妆 / 网感妆）===== */
.pc-type-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.pct-tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.6;
  background: var(--c-primary-lighter);
  color: var(--c-primary);
}
.pct-tag b { font-weight: 700; }

/* 三种类型用不同底色，扫一眼即可区分 */
.pct-tag.pct-daily, .pc-type-tag.pct-daily, .pct-tag-mini.pct-daily { background: #F9EAE7; color: #C0392B; }
.pct-tag.pct-style, .pc-type-tag.pct-style, .pct-tag-mini.pct-style { background: #F3EFFB; color: #7B5EA7; }
.pct-tag.pct-net,   .pc-type-tag.pct-net,   .pct-tag-mini.pct-net   { background: #EAF4FB; color: #2E7BA6; }
.pct-tag.pct-unset, .pc-type-tag.pct-unset, .pct-tag-mini.pct-unset { background: var(--c-bg-gray); color: var(--c-text-placeholder); }

/* ===== 下拉式门店多选（员工端 + 卡项日志页共用，v6.1） ===== */
.dd-wrap { position: relative; flex: 1; min-width: 0; }
.dd-wrap .store-multi-btn { width: 100%; flex: none; }
.dd-panel {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; min-width: 200px;
  background: var(--c-card); border: 1px solid var(--c-border); border-radius: 12px;
  box-shadow: 0 10px 28px rgba(58, 46, 42, .18); padding: 6px; z-index: 60;
}
.dd-item { display: flex; align-items: center; gap: 8px; padding: 9px 10px; font-size: 13px; border-radius: 8px; cursor: pointer; }
.dd-item:active { background: var(--c-bg-gray); }
.dd-item .dd-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-check {
  width: 17px; height: 17px; border-radius: 5px; border: 1.5px solid var(--c-border);
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: #fff;
}
.dd-check.checked { background: var(--c-primary); border-color: var(--c-primary); }
.dd-foot { display: flex; gap: 8px; padding: 8px 4px 2px; border-top: 1px dashed var(--c-border-light); margin-top: 4px; }
.dd-foot .btn { padding: 7px 0; font-size: 12.5px; }

/* ===== 卡项操作日志（v6.1 新增） ===== */
.pass-tab.gold { color: var(--c-gold); }
.pass-tab.active.gold { color: var(--c-gold); border-bottom-color: var(--c-gold); }
.log-sum {
  background: var(--c-card); border: 1px solid var(--c-border-light); border-radius: 12px;
  padding: 10px 12px; margin-bottom: 10px; display: flex; align-items: center; gap: 6px;
  flex-wrap: wrap; font-size: 12px; color: var(--c-text-secondary);
}
.log-sum b { color: var(--c-primary); font-size: 16px; margin-right: 2px; }
.log-pill { border-radius: 10px; padding: 2px 8px; font-size: 11px; }
.log-pill.c { background: var(--c-primary-lighter); color: var(--c-primary); }
.log-pill.a { background: var(--c-success-bg); color: var(--c-success); }
.log-pill.m { background: var(--c-info-bg); color: var(--c-info); }
.log-item { background: var(--c-card); border: 1px solid var(--c-border-light); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; }
.log-item .li-top { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.log-type { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 9px; flex-shrink: 0; }
.log-type.c { background: var(--c-primary-lighter); color: var(--c-primary); }
.log-type.a { background: var(--c-success-bg); color: var(--c-success); }
.log-type.m { background: var(--c-info-bg); color: var(--c-info); }
.log-title { font-size: 13.5px; font-weight: 600; }
.log-who {
  font-size: 10.5px; background: var(--c-primary-lighter); color: var(--c-primary);
  font-weight: 600; padding: 1px 6px; border-radius: 8px; border: 1px solid var(--c-primary-light);
}
.log-sub { font-size: 11.5px; color: var(--c-text-secondary); line-height: 1.6; margin-top: 3px; }
.date-range { display: flex; align-items: center; gap: 4px; flex: 1.5; min-width: 0; }
.date-range input {
  flex: 1; min-width: 0; width: 100%; height: 36px; border: 1px solid var(--c-border); border-radius: 8px;
  padding: 0 6px; font-size: 11.5px; background: var(--c-card); color: var(--c-text); box-sizing: border-box;
}
.pct-tag.pct-course, .pc-type-tag.pct-course, .pct-tag-mini.pct-course { background: #EAF7F0; color: #2E8B6B; }

/* 单卡/表单内的类型标签 */
.pc-type-tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 600;
  vertical-align: 1px;
  background: var(--c-primary-lighter);
  color: var(--c-primary);
}

/* 流水行内的小标签 */
.pct-tag-mini {
  display: inline-block;
  padding: 0 6px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 600;
  vertical-align: 1px;
  margin-right: 2px;
  background: var(--c-primary-lighter);
  color: var(--c-primary);
}

/* 次卡类型选择（登记售卡 / 补录类型） */
.type-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.type-chip {
  flex: 1 1 0;
  min-width: 88px;
  text-align: center;
  padding: 10px 8px;
  border-radius: 10px;
  border: 1.5px solid var(--c-border-light);
  background: var(--c-bg);
  font-size: 13px;
  color: var(--c-text-secondary);
  cursor: pointer;
  transition: all .15s;
}
.type-chip.selected {
  border-color: var(--c-primary);
  background: var(--c-primary-lighter);
  color: var(--c-primary);
  font-weight: 600;
}
.type-chip .check-mark {
  width: 14px;
  height: 14px;
  display: none;
  margin-left: 3px;
  font-size: 11px;
}
.type-chip.selected .check-mark { display: inline-block; }
.type-chip:active { transform: scale(.98); }

/* 未分类提示（类型选择弹窗内） */
.acc-type-unset {
  font-size: 10px;
  color: var(--c-warning);
  margin-left: 4px;
  font-weight: 500;
}

/* ===== 顾客联系标识（手机号 / 微信号） ===== */
.pc-contact {
  font-size: 12px;
  color: var(--c-text-secondary);
  flex: none;
  max-width: 46%;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* 微信号标签：与手机号区分（蓝色系，示意"微信通道"） */
.pc-wechat-tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 600;
  background: #EAF4FB;
  color: #2E7BA6;
  vertical-align: 1px;
}

/* ===== 账户详情：已退卡/已用完 折叠条 ===== */
.acc-closed-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  margin-top: 6px;
  border-radius: 10px;
  border: 1px dashed var(--c-border-light);
  background: var(--c-bg-gray);
  font-size: 12px;
  color: var(--c-text-secondary);
  cursor: pointer;
  user-select: none;
}
.acc-closed-toggle:active { background: var(--c-border-light); }
.acc-closed-sub { font-size: 11px; color: var(--c-text-placeholder); }

/* ===== 定金统计升级（v5.2）：双视图/月小计/明细展开 ===== */
.dep-tabs { display: flex; background: var(--c-bg-gray); border-radius: 10px; padding: 3px; margin-bottom: 12px; }
.dep-tab { flex: 1; text-align: center; padding: 8px 0; font-size: 13.5px; color: var(--c-text-secondary); border-radius: 8px; cursor: pointer; }
.dep-tab.active { background: #fff; color: var(--c-primary); font-weight: 600; box-shadow: 0 1px 5px rgba(120,90,60,.18); }
.dep-store-btn { width: 100%; margin-bottom: 10px; }
.dep-date-row { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.dep-date-row input[type="date"] { flex: 1; padding: 8px 10px; border: 1px solid var(--c-border); border-radius: 9px; font-size: 13px; color: var(--c-text); background: #fff; outline: none; min-width: 0; }
.dep-date-sep { font-size: 12px; color: var(--c-text-placeholder); flex-shrink: 0; }
.dep-base-label { font-size: 12.5px; color: var(--c-text-secondary); flex-shrink: 0; }
.dep-today-tag { font-size: 11px; color: var(--c-primary); background: var(--c-primary-lighter); padding: 3px 9px; border-radius: 20px; flex-shrink: 0; }
.dep-today-btn { font-size: 11px; color: var(--c-primary); background: var(--c-primary-lighter); border: none; padding: 4px 10px; border-radius: 20px; flex-shrink: 0; }
.dep-summary { background: var(--gradient-primary); border-radius: 14px; padding: 16px; color: #fff; text-align: center; margin-bottom: 12px; }
.dep-summary .ds-amount { font-size: 27px; font-weight: 700; }
.dep-summary .ds-label { font-size: 12.5px; opacity: .92; margin-top: 4px; }
.dep-summary .dep-caliber { margin-top: 9px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.3); font-size: 10.5px; opacity: .95; line-height: 1.6; }
.dep-due2 { display: flex; gap: 8px; margin-bottom: 12px; }
.dep-due-cell { flex: 1; background: #fff; border: 1px solid var(--c-border); border-radius: 11px; padding: 9px 11px; }
.dep-due-cell .k { font-size: 10.5px; color: var(--c-text-secondary); margin-bottom: 2px; line-height: 1.4; }
.dep-due-cell .v { font-size: 15.5px; font-weight: 700; color: var(--c-primary-dark); }
.dep-due-cell .v small { font-size: 10px; font-weight: 400; color: var(--c-text-placeholder); margin-left: 3px; }
.dep-due-cell.past { border-color: #EAD9C2; background: #FDFAF3; }
.dep-due-cell.past .v { color: #A8823F; }
.dep-month-sub { display: flex; justify-content: space-between; align-items: center; background: var(--c-primary-lighter); border-radius: 9px; padding: 7px 12px; margin-bottom: 9px; font-size: 12px; color: var(--c-primary-dark); }
.dep-month-sub b { font-size: 13px; }
.dep-day { background: #fff; border: 1px solid var(--c-border-light); border-radius: 12px; margin-bottom: 8px; overflow: hidden; box-shadow: var(--shadow-sm); }
.dep-day-head { display: flex; justify-content: space-between; align-items: center; padding: 11px 13px; cursor: pointer; }
.dep-day-head:active { background: var(--c-bg-gray); }
.dep-day-head .dd-date { font-size: 13.5px; font-weight: 600; }
.dep-day-head .dd-wk { font-size: 11.5px; color: var(--c-text-placeholder); font-weight: 400; margin-left: 5px; }
.dep-day-head .dd-expire { display: inline-block; margin-left: 6px; padding: 1.5px 7px; border-radius: 20px; font-size: 10px; font-weight: 400; background: #F1EBDD; color: #A8823F; }
.dep-day-head .dd-right { text-align: right; flex-shrink: 0; }
.dep-day-head .dd-amount { font-size: 14.5px; font-weight: 700; color: var(--c-primary); display: block; }
.dep-day-head .dd-sub { font-size: 10.5px; color: var(--c-text-placeholder); }
.dep-day-head .dd-arrow { font-size: 10px; color: var(--c-text-placeholder); margin-left: 5px; }
.dep-day-detail { border-top: 1px dashed var(--c-border); background: var(--c-bg); }
.dep-item { display: flex; align-items: center; gap: 8px; padding: 9px 13px; border-bottom: 1px solid var(--c-border-light); cursor: pointer; }
.dep-item:last-child { border-bottom: none; }
.dep-item:active { background: #fff; }
.dep-item .di-time { font-size: 12px; color: var(--c-primary-dark); font-weight: 600; width: 36px; flex-shrink: 0; }
.dep-item .di-info { flex: 1; min-width: 0; }
.dep-item .di-l1 { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dep-item .di-l2 { font-size: 10.5px; color: var(--c-text-placeholder); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dep-item .di-amount { font-size: 13px; font-weight: 700; color: var(--c-primary); flex-shrink: 0; }
.dep-item .di-go { width: 16px; height: 16px; border-radius: 50%; background: var(--c-border-light); color: var(--c-text-placeholder); font-size: 9px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.dep-hint { display: flex; gap: 6px; align-items: flex-start; background: var(--c-info-bg); border-radius: 9px; padding: 8px 11px; font-size: 11px; color: #4d7ba6; line-height: 1.55; margin-top: 10px; }
