/* ==============================================
 * 美店轻管家 admin · Business Components
 * fp-tabs / fp-tag / stat-card / chart-card / timeline / etc.
 * ============================================== */

/* ============= Stat cards ============= */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}

.stat-card {
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-lighter);
}

.stat-card .lbl {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.stat-card .val {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-ink);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.stat-card .val .unit {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 400;
  margin-left: 2px;
}

.stat-card .trend {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.stat-card .trend b { color: var(--text-primary); font-weight: 500; }
.stat-card .trend.up b { color: var(--color-success); }
.stat-card .trend.down b { color: var(--color-danger); }

.stat-card .deco {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-primary), #FC8F33);
  opacity: 0.92;
}

.stat-card .deco.blue { background: linear-gradient(135deg, var(--st-src-pos), var(--st-appt-arrived)); }
.stat-card .deco.green { background: linear-gradient(135deg, var(--st-appt-completed), var(--color-success)); }
.stat-card .deco.purple { background: linear-gradient(135deg, var(--st-src-technician), #5f5773); }
.stat-card .deco.pink { background: linear-gradient(135deg, var(--st-wallet-gift), var(--st-card-active)); }
.stat-card .deco.gold { background: linear-gradient(135deg, var(--st-src-admin), var(--st-appt-pending)); }

/* ============= Section bar (title + orange tick) ============= */
.fp-section-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 4px;
}

.fp-section-bar .fp-sb-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
}

.fp-section-bar .fp-sb-title::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 16px;
  background: var(--brand-primary);
  margin-right: 8px;
  border-radius: 1px;
}

.fp-section-bar .fp-sb-update {
  font-size: 12px;
  color: var(--text-secondary);
}

.fp-section-bar.inner {
  padding: 14px 16px 0;
}

/* ============= Chart card ============= */
.fp-chart-card {
  background: #fff;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-lighter);
}

.fp-chart-card .fp-chart-box {
  padding: 0 16px 16px;
}

/* ============= KPI grid (compact) ============= */
.fp-kpi-grid {
  display: grid;
  gap: 12px;
}

.fp-kpi-card {
  background: #fff;
  border: 1px solid var(--border-lighter);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
}

.fp-kpi-card .k-lbl {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.fp-kpi-card .k-val {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-ink);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.fp-kpi-card .k-sub {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

/* ============= Welcome row ============= */
.fp-welcome-row {
  display: grid;
  grid-template-columns: 1.1fr 2fr;
  gap: 12px;
  margin-bottom: 12px;
}

.fp-welcome-card {
  background: linear-gradient(135deg, var(--brand-primary) 0%, #FC8F33 100%);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 22px 24px;
}

.fp-welcome-card .wc-greet { font-size: 18px; font-weight: 600; }
.fp-welcome-card .wc-sub { margin-top: 8px; opacity: 0.88; font-size: 13px; }

.fp-todo-card {
  background: #fff;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-lighter);
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fp-section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
}

.fp-section-title::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 14px;
  background: var(--brand-primary);
  margin-right: 8px;
  border-radius: 1px;
}

.fp-todo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.fp-todo-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--border-lighter);
  border-radius: var(--radius-sm);
  background: var(--bg-gray-50);
  cursor: pointer;
  transition: all 0.15s;
}

.fp-todo-cell:hover {
  border-color: var(--brand-primary);
  background: var(--brand-primary-bg);
}

.fp-todo-cell .tc-ic { color: var(--brand-primary); }
.fp-todo-cell .tc-lbl { color: var(--text-secondary); font-size: 12px; }
.fp-todo-cell .tc-num { color: var(--text-ink); font-weight: 700; font-size: 16px; margin-left: auto; }

/* ============= fp-tabs ============= */
.fp-tabs {
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 24px;
  height: 42px;
  border-bottom: 1px solid var(--border-lighter);
  background: #fff;
}

.fp-tab {
  height: 42px;
  display: flex;
  align-items: center;
  font-size: 14px;
  color: var(--text-regular);
  cursor: pointer;
  position: relative;
  white-space: nowrap;
}

.fp-tab::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: transparent;
}

.fp-tab:hover { color: var(--brand-primary); }
.fp-tab.active { color: var(--brand-primary); font-weight: 500; }
.fp-tab.active::after { background: var(--brand-primary); }
.fp-tab .cnt { color: var(--text-strong); margin-left: 4px; font-weight: 500; }
.fp-tab.active .cnt { color: var(--brand-primary); }

/* ============= fp-tag (status / business labels) ============= */
.fp-tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  font-size: 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  background: var(--bg-gray-100);
  border: 1px solid transparent;
  white-space: nowrap;
}

.fp-tag.member    { color: var(--brand-primary); background: #FFF6EB; }
.fp-tag.recommend { color: var(--st-card-active); background: var(--st-card-active-bg); }
.fp-tag.new       { color: var(--st-card-using); background: var(--st-card-using-bg); }
.fp-tag.success   { color: var(--color-success); background: var(--st-appt-completed-bg); }
.fp-tag.warning   { color: var(--color-warning); background: var(--st-appt-pending-bg); }
.fp-tag.info      { color: var(--color-info); background: var(--st-appt-confirmed-bg); }
.fp-tag.danger    { color: var(--color-danger); background: var(--st-appt-no_show-bg); }

/* 预约状态 */
.fp-tag.appt-pending   { color: var(--st-appt-pending); background: var(--st-appt-pending-bg); }
.fp-tag.appt-confirmed { color: var(--st-appt-confirmed); background: var(--st-appt-confirmed-bg); }
.fp-tag.appt-arrived   { color: var(--st-appt-arrived); background: var(--st-appt-arrived-bg); }
.fp-tag.appt-serving   { color: var(--st-appt-serving); background: var(--st-appt-serving-bg); }
.fp-tag.appt-completed { color: var(--st-appt-completed); background: var(--st-appt-completed-bg); }
.fp-tag.appt-cancelled { color: var(--st-appt-cancelled); background: var(--st-appt-cancelled-bg); }
.fp-tag.appt-no-show   { color: var(--st-appt-no_show); background: var(--st-appt-no_show-bg); }

/* ============= Table operation column ============= */
.tbl-action {
  color: var(--brand-primary);
  cursor: pointer;
  font-size: 13px;
  margin: 0 2px;
}
.tbl-action:hover { color: var(--brand-primary-active); }
.tbl-action.danger { color: var(--color-danger); }
.tbl-action.danger:hover { color: #7f4147; }
.tbl-sep { color: var(--border-base); margin: 0 4px; }

/* ============= Appointment board ============= */
.appt-board-grid {
  display: grid;
  grid-template-columns: 64px repeat(var(--staff-count, 4), 1fr);
  background: #fff;
  border: 1px solid var(--border-lighter);
  border-radius: var(--radius-sm);
}

.appt-board-grid .ab-head {
  background: var(--bg-cool-50);
  padding: 10px 8px;
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 600;
  border-bottom: 1px solid var(--border-lighter);
  border-right: 1px solid var(--border-lighter);
  text-align: center;
}

.appt-board-grid .ab-time {
  padding: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-lighter);
  border-right: 1px solid var(--border-lighter);
  text-align: center;
}

.appt-board-grid .ab-cell {
  min-height: 56px;
  padding: 6px;
  border-bottom: 1px solid var(--border-lighter);
  border-right: 1px solid var(--border-lighter);
  position: relative;
}

.appt-board-grid .ab-cell:last-child { border-right: 0; }

.appt-board-grid .ab-card {
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  background: var(--brand-primary-bg);
  border-left: 3px solid var(--brand-primary);
  font-size: 12px;
  cursor: pointer;
}

.appt-board-grid .ab-card .ab-cust { font-weight: 600; color: var(--text-ink); }
.appt-board-grid .ab-card .ab-svc { color: var(--text-secondary); margin-top: 2px; }

.appt-board-grid .ab-card.appt-pending   { background: var(--st-appt-pending-bg); border-left-color: var(--st-appt-pending); }
.appt-board-grid .ab-card.appt-confirmed { background: var(--st-appt-confirmed-bg); border-left-color: var(--st-appt-confirmed); }
.appt-board-grid .ab-card.appt-arrived   { background: var(--st-appt-arrived-bg); border-left-color: var(--st-appt-arrived); }
.appt-board-grid .ab-card.appt-serving   { background: var(--st-appt-serving-bg); border-left-color: var(--st-appt-serving); }
.appt-board-grid .ab-card.appt-completed { background: var(--st-appt-completed-bg); border-left-color: var(--st-appt-completed); }
.appt-board-grid .ab-card.appt-cancelled { background: var(--st-appt-cancelled-bg); border-left-color: var(--st-appt-cancelled); opacity: 0.68; }
.appt-board-grid .ab-card.appt-no-show   { background: var(--st-appt-no_show-bg); border-left-color: var(--st-appt-no_show); }

/* ============= Customer detail ============= */
.cd-grid {
  display: grid;
  grid-template-columns: 1.1fr 2fr;
  gap: 12px;
}

.cd-profile {
  background: #fff;
  border: 1px solid var(--border-lighter);
  border-radius: var(--radius-sm);
  padding: 20px;
}

.cd-profile .cd-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-primary), #FC8F33);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 24px;
  font-weight: 700;
}

.cd-profile .cd-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-ink);
  margin-top: 12px;
}

.cd-profile .cd-meta { color: var(--text-secondary); font-size: 12px; margin-top: 4px; }

.cd-profile .cd-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.cd-profile .cd-assets {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.cd-profile .cd-asset {
  padding: 12px;
  background: var(--bg-warm-50);
  border-radius: var(--radius-sm);
}

.cd-profile .cd-asset .lbl { color: var(--text-secondary); font-size: 12px; }
.cd-profile .cd-asset .val { color: var(--brand-primary); font-size: 20px; font-weight: 700; margin-top: 4px; }

/* ============= Batch action bar ============= */
.batch-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin-bottom: 12px;
  background: var(--brand-primary-bg);
  border: 1px solid var(--brand-primary-border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-primary);
}

.batch-bar b { color: var(--brand-primary); font-weight: 700; }
.batch-bar a { color: var(--brand-primary); cursor: pointer; }
.batch-bar a:hover { text-decoration: underline; }
.batch-bar .batch-sep { color: var(--border-base); }

/* ============= Role chip active ============= */
.page-body [class*="active"][style*="border"] {
  border-color: var(--brand-primary) !important;
  background: var(--brand-primary-bg) !important;
}

/* ============= Drawer detail line ============= */
.dt-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border-lighter);
  font-size: 13px;
}

.dt-line span:first-child { color: var(--text-secondary); }
.dt-line b { color: var(--text-ink); font-weight: 600; }
.dt-line:last-child { border-bottom: 0; }

/* ============= Empty placeholder ============= */
.placeholder-empty {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 220px);
  color: var(--text-secondary);
  text-align: center;
}

.placeholder-empty .pe-ic { font-size: 56px; margin-bottom: 12px; color: var(--brand-primary-light); }
.placeholder-empty .pe-tt { font-size: 16px; font-weight: 600; color: var(--text-primary); }
.placeholder-empty .pe-sb { margin-top: 6px; font-size: 13px; }

/* ============= Element Plus tweaks ============= */
.el-switch.is-checked .el-switch__core {
  background-color: var(--brand-primary) !important;
  border-color: var(--brand-primary) !important;
}

.el-table th.el-table__cell {
  background: var(--bg-cool-50) !important;
}

.el-table .el-table__row:hover > td {
  background: var(--bg-gray-50) !important;
}

.el-button--primary {
  --el-button-bg-color: var(--brand-primary);
  --el-button-border-color: var(--brand-primary);
  --el-button-hover-bg-color: var(--brand-primary-hover);
  --el-button-hover-border-color: var(--brand-primary-hover);
  --el-button-active-bg-color: var(--brand-primary-active);
  --el-button-active-border-color: var(--brand-primary-active);
}

.el-tabs__active-bar { background-color: var(--brand-primary) !important; }
.el-tabs__item.is-active { color: var(--brand-primary) !important; }
.el-tabs__item:hover { color: var(--brand-primary) !important; }

/* ============= setting/channel ============= */
.md-channel-intro {
  margin: 0 0 14px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.7;
}
.md-channel-intro span { color: var(--st-appt-no_show); }
.md-channel-tabs {
  margin: 0 -16px 16px;
  overflow-x: auto;
}
.md-channel-tab { gap: 8px; }
.md-channel-tab-status {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--bg-subtle, #F7F8FA);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 500;
}
.md-channel-tab-status.active {
  background: #ECF9F1;
  color: #1FA956;
}
.md-channel-tab-status.configured {
  background: #FFF3E6;
  color: var(--brand-primary);
}
.md-channel-tab-status.error {
  background: #FEF0F0;
  color: #D03050;
}
.md-channel-panel {
  min-height: 300px;
}
.md-channel-unified {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 18px;
  border: 1px solid var(--border-base);
  border-radius: 8px;
  padding: 20px;
  background: linear-gradient(135deg, #FFFFFF 0%, #F7FBF9 100%);
}
.md-channel-eyebrow {
  margin-bottom: 6px;
  color: #1FA956;
  font-size: 12px;
  font-weight: 600;
}
.md-channel-unified-title {
  color: var(--text-primary);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
}
.md-channel-unified-desc {
  max-width: 680px;
  margin-top: 10px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.8;
}
.md-channel-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}
.md-channel-facts > div {
  border: 1px solid var(--border-lighter);
  border-radius: 6px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.78);
}
.md-channel-facts span {
  display: block;
  margin-bottom: 4px;
  color: var(--text-placeholder);
  font-size: 12px;
}
.md-channel-facts b {
  color: var(--text-primary);
  font-size: 13px;
}
.md-channel-unified-side {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}
.md-channel-mini-code {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 140px;
  border: 1px dashed #A8DDBA;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(31,169,86,0.07) 50%, transparent 0) 0 0/12px 12px,
    linear-gradient(rgba(31,169,86,0.07) 50%, transparent 0) 0 0/12px 12px,
    #FFFFFF;
}
.md-channel-mini-code-inner {
  width: 82px;
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 8px solid #1FA956;
  border-radius: 6px;
  color: #1FA956;
  font-size: 12px;
  font-weight: 700;
  background: #FFFFFF;
}
.md-channel-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.md-channel-capabilities {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.md-channel-capabilities > div,
.md-channel-card {
  border: 1px solid var(--border-base);
  border-radius: 8px;
  background: var(--bg-card, #FFFFFF);
}
.md-channel-capabilities > div {
  padding: 14px 16px;
}
.md-channel-capabilities b {
  display: block;
  margin-bottom: 6px;
  color: var(--text-primary);
  font-size: 13px;
}
.md-channel-capabilities span {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.6;
}
.md-channel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 14px;
}
.md-channel-card {
  padding: 16px 18px;
}
.md-channel-card-head,
.md-channel-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.md-channel-card-title {
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 600;
}
.md-channel-card-sub {
  margin-top: 3px;
  color: var(--text-placeholder);
  font-size: 12px;
}
.md-channel-card-desc {
  min-height: 44px;
  margin: 12px 0 16px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.65;
}
.md-channel-enable {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 13px;
}
.md-channel-test-note {
  margin-top: 10px;
  color: var(--text-placeholder);
  font-size: 12px;
}
@media (max-width: 900px) {
  .md-channel-unified,
  .md-channel-capabilities,
  .md-channel-facts {
    grid-template-columns: 1fr;
  }
}

/* ==============================================
 * Commercial Surfaces: Dashboard + Quick Billing
 * ============================================== */
.biz-shell {
  display: grid;
  gap: 12px;
}

.biz-hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 12px;
  border: 1px solid var(--border-lighter);
  border-radius: var(--radius-md);
  background:
    radial-gradient(120% 180% at 0% 0%, #fff3e6 0%, rgba(255, 243, 230, 0) 60%),
    linear-gradient(180deg, #ffffff 0%, #ffffff 100%);
  box-shadow: var(--shadow-card);
  padding: 18px;
}

.biz-hero-main {
  display: grid;
  gap: 8px;
}

.biz-hero-kicker {
  font-size: 11px;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--brand-primary-active);
}

.biz-hero-title {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
  color: var(--text-ink);
  font-weight: 800;
}

.biz-hero-sub {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.7;
  max-width: 620px;
}

.biz-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.biz-hero-side {
  border: 1px solid var(--border-lighter);
  border-radius: var(--radius-md);
  background: #fff;
  padding: 10px 12px;
  display: grid;
  gap: 8px;
}

.biz-metric {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px dashed var(--border-lighter);
  padding-bottom: 8px;
}

.biz-metric:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.biz-metric .k {
  color: var(--text-secondary);
  font-size: 12px;
}

.biz-metric .v {
  color: var(--text-ink);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.biz-metric.warn .v {
  color: var(--st-appt-no_show);
}

.biz-panel {
  border: 1px solid var(--border-lighter);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-card);
  padding: 14px;
}

.biz-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}

.biz-panel-head h3 {
  margin: 0;
  font-size: 15px;
  color: var(--text-ink);
  font-weight: 700;
}

.biz-panel-head span {
  font-size: 12px;
  color: var(--text-secondary);
}

.biz-link {
  cursor: pointer;
}

.biz-link:hover {
  color: var(--brand-primary);
}

.biz-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.kpi-source-chip {
  position: absolute; top: 8px; right: 8px;
  font-size: 10px; color: #999; padding: 1px 6px;
  background: #F0F2F5; border-radius: 3px;
  z-index: 1;
}
.kpi-source-chip.real { color: #fff; background: var(--brand-primary); }

.biz-split {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 10px;
}

.biz-caption {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 10px;
}

.biz-risk-list {
  display: grid;
  gap: 8px;
}

.biz-risk-item {
  border: 1px solid var(--border-lighter);
  border-radius: var(--radius-sm);
  background: var(--bg-gray-50);
  padding: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.biz-risk-item .tt {
  margin: 0;
  font-size: 13px;
  color: var(--text-ink);
  font-weight: 600;
}

.biz-risk-item .sb {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--text-secondary);
}

.biz-risk-num {
  font-size: 18px;
  line-height: 1;
  font-weight: 800;
  color: var(--text-ink);
}

.biz-risk-num.danger {
  color: var(--st-appt-no_show);
}

.biz-grid-2 {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 10px;
}

.biz-grid-2-ratio {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 10px;
}

.quick-shell {
  display: grid;
  gap: 10px;
}

.quick-hero {
  border: 1px solid var(--border-lighter);
  border-radius: var(--radius-md);
  background: linear-gradient(130deg, #fff8f2 0%, #ffffff 45%, #ffffff 100%);
  box-shadow: var(--shadow-card);
  padding: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.quick-kicker {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--brand-primary-active);
  font-weight: 700;
}

.quick-hero h2 {
  margin: 2px 0 0;
  font-size: 26px;
  color: var(--text-ink);
  line-height: 1.2;
}

.quick-hero p {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.quick-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-main {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 10px;
}

.quick-catalog,
.quick-checkout {
  display: grid;
  gap: 10px;
}

.quick-block {
  border: 1px solid var(--border-lighter);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-card);
  padding: 12px;
}

.quick-block-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  gap: 10px;
}

.quick-block-head h3 {
  margin: 0;
  color: var(--text-ink);
  font-size: 15px;
  font-weight: 700;
}

.quick-block-head span {
  color: var(--text-secondary);
  font-size: 12px;
}

.quick-customer-list {
  display: grid;
  gap: 6px;
  margin-top: 8px;
  max-height: 220px;
  overflow: auto;
}

.quick-customer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border-lighter);
  border-radius: var(--radius-sm);
  padding: 9px 10px;
  cursor: pointer;
  background: #fff;
}

.quick-customer:hover,
.quick-customer.active {
  border-color: var(--brand-primary-border);
  background: var(--brand-primary-bg);
}

.quick-customer .nm {
  margin: 0;
  color: var(--text-ink);
  font-size: 13px;
  font-weight: 600;
}

.quick-customer .sb {
  margin: 2px 0 0;
  color: var(--text-secondary);
  font-size: 12px;
}

.quick-customer .bal {
  color: var(--brand-primary-active);
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.quick-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.quick-tab {
  border: 1px solid var(--border-lighter);
  background: #fff;
  color: var(--text-regular);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  cursor: pointer;
}

.quick-tab.active,
.quick-tab:hover {
  color: var(--brand-primary-active);
  border-color: var(--brand-primary-border);
  background: var(--brand-primary-bg);
}

.quick-service-grid {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.quick-service {
  border: 1px solid var(--border-lighter);
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 10px;
  text-align: left;
  cursor: pointer;
  min-height: 98px;
}

.quick-service:hover {
  border-color: var(--brand-primary-border);
  background: var(--brand-primary-bg);
}

.quick-service .tt {
  margin: 0;
  color: var(--text-ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

.quick-service .meta {
  margin: 4px 0 0;
  color: var(--text-secondary);
  font-size: 12px;
}

.quick-service .price {
  margin: 8px 0 0;
  color: var(--brand-primary-active);
  font-size: 15px;
  font-weight: 800;
}

.quick-empty {
  min-height: 120px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--text-secondary);
  font-size: 12px;
}

.quick-empty .el-icon {
  font-size: 34px;
  color: var(--brand-primary-light);
}

.quick-cart-list {
  display: grid;
  gap: 6px;
  max-height: 280px;
  overflow: auto;
}

.quick-cart-item {
  border: 1px solid var(--border-lighter);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.quick-cart-item .tt {
  margin: 0;
  font-size: 13px;
  color: var(--text-ink);
  font-weight: 600;
}

.quick-cart-item .sb {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--text-secondary);
}

.quick-cart-item .right {
  text-align: right;
  display: grid;
  gap: 4px;
}

.quick-cart-item .amt {
  font-size: 14px;
  color: var(--brand-primary-active);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.quick-cart-item .rm {
  border: 0;
  background: transparent;
  color: var(--color-danger);
  cursor: pointer;
  font-size: 12px;
}

.quick-form {
  display: grid;
  gap: 8px;
}

.quick-summary {
  margin-top: 10px;
  border-top: 1px dashed var(--border-lighter);
  border-bottom: 1px dashed var(--border-lighter);
  padding: 10px 0;
  display: grid;
  gap: 7px;
}

.quick-summary .row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
  color: var(--text-secondary);
}

.quick-summary .row b {
  color: var(--text-ink);
}

.quick-summary .row.total {
  font-size: 15px;
  color: var(--text-ink);
  align-items: center;
}

.quick-summary .warn {
  color: var(--color-warning);
}

.quick-wallet-note {
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border-lighter);
  border-radius: var(--radius-sm);
  background: var(--bg-cool-50);
}

.quick-wallet-note p {
  margin: 0;
  font-size: 12px;
  color: var(--text-secondary);
}

.quick-wallet-note p + p {
  margin-top: 4px;
}

.quick-submit-row {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

@media (max-width: 1320px) {
  .biz-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .biz-split,
  .biz-grid-2,
  .biz-grid-2-ratio,
  .quick-main {
    grid-template-columns: 1fr;
  }

  .quick-service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .biz-hero {
    grid-template-columns: 1fr;
  }

  .quick-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .quick-service-grid {
    grid-template-columns: 1fr;
  }
}

/* ==============================================
 * 预约设置 / 排班 / 员工服务 三页共用样式（Phase 28）
 * ============================================== */

/* fieldset 卡 */
.md-fieldset {
  border: 1px solid var(--border-light, #eaecf0);
  border-radius: 8px;
  padding: 14px 16px 4px;
  margin-bottom: 16px;
  background: var(--bg-card, #fff);
}
.md-fieldset-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--border-light);
  display: flex;
  align-items: center;
  gap: 8px;
}
.md-fieldset-sub {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 400;
}
.md-meta {
  font-size: 12px;
  color: var(--text-secondary);
}
.md-meta .dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}
.md-meta .dot.ok    { background: #67C23A; }
.md-meta .dot.rest  { background: #E4E7ED; }
.md-meta .dot.leave { background: #FAAD14; }
.md-meta .dot.sick  { background: #F56C6C; }
.md-meta .dot.star  { background: #FB7B10; }
.md-meta .dot.empty { background: #F4F4F5; border: 1px dashed #DCDFE6; }

/* 排班矩阵 */
.md-schedule-grid {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  overflow: hidden;
  font-size: 12px;
}
.md-schedule-grid th,
.md-schedule-grid td {
  border-right: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  padding: 6px 4px;
  text-align: center;
  vertical-align: middle;
}
.md-schedule-grid th:last-child,
.md-schedule-grid td:last-child {
  border-right: none;
}
.md-schedule-grid tr:last-child td {
  border-bottom: none;
}
.md-schedule-grid thead th {
  background: var(--bg-subtle, #FAFAFA);
  font-weight: 600;
}
.md-schedule-grid thead th.today {
  background: #FFF3E6;
  color: var(--brand-primary, #FB7B10);
}
.md-schedule-grid thead th .dt {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 400;
  margin-top: 2px;
}
.md-schedule-grid .who {
  text-align: left;
  padding-left: 12px;
  background: var(--bg-subtle, #FAFAFA);
}
.md-schedule-grid .who .nm { font-weight: 600; font-size: 13px; }
.md-schedule-grid .who .rl { font-size: 11px; color: var(--text-secondary); }
.md-schedule-grid .cell {
  cursor: pointer;
  min-width: 70px;
  min-height: 52px;
  transition: background .15s;
}
.md-schedule-grid .cell.empty { color: #C0C4CC; }
.md-schedule-grid .cell.ok    { background: #F0F9EB; color: #5C8C3B; font-weight: 500; }
.md-schedule-grid .cell.rest  { background: #F4F4F5; color: #909399; }
.md-schedule-grid .cell.leave { background: #FFF7E6; color: #D89614; }
.md-schedule-grid .cell.sick  { background: #FEF0F0; color: #F56C6C; }
.md-schedule-grid .cell:hover {
  filter: brightness(0.96);
  outline: 1px dashed var(--brand-primary, #FB7B10);
  outline-offset: -2px;
}
.md-schedule-grid .cell-time {
  font-family: ui-monospace, Menlo, monospace;
  line-height: 1.3;
}
.md-schedule-grid .cell-label {
  font-size: 14px;
  font-weight: 600;
}
.md-schedule-grid .cell-empty {
  color: #C0C4CC;
  font-size: 18px;
}

.schedule-page .page-header {
  align-items: flex-start;
}

.schedule-title-sub {
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.5;
}

.schedule-kpi-row {
  margin-bottom: 12px;
}

.schedule-kpi-foot {
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 12px;
}

.schedule-workbench {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}

.schedule-panel {
  background: #fff;
  border: 1px solid var(--border-lighter);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 14px;
}

.schedule-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}

.schedule-panel-head h3 {
  margin: 0;
  color: var(--text-ink);
  font-size: 15px;
  font-weight: 700;
  text-wrap: balance;
}

.schedule-panel-head span {
  display: block;
  margin-top: 3px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.5;
  text-wrap: pretty;
}

.schedule-ai-form .el-form-item {
  margin-bottom: 10px;
}

.schedule-ai-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.schedule-ai-actions .el-button {
  min-height: 32px;
  transition-property: scale, background-color, border-color, color;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}

.schedule-ai-actions .el-button:active {
  scale: 0.96;
}

.schedule-ai-result {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border-lighter);
}

.schedule-ai-stamp {
  color: var(--brand-primary-active);
  font-size: 12px;
  font-weight: 600;
}

.schedule-ai-stamp.muted {
  color: var(--text-secondary);
  font-weight: 400;
}

.schedule-risk-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.schedule-risk-item {
  padding: 9px 10px;
  border-radius: var(--radius-md);
  background: var(--bg-warm-50);
  box-shadow:
    0 0 0 1px rgba(251, 123, 16, 0.14),
    0 1px 2px -1px rgba(0, 0, 0, 0.08);
}

.schedule-risk-item b {
  display: block;
  color: var(--text-ink);
  font-size: 12px;
}

.schedule-risk-item span {
  display: block;
  margin-top: 3px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.45;
}

.schedule-risk-empty {
  margin-top: 10px;
  padding: 10px;
  color: var(--color-success);
  background: var(--st-appt-completed-bg);
  border-radius: var(--radius-md);
  font-size: 12px;
}

.schedule-day-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.schedule-day-card {
  min-width: 0;
  padding: 10px;
  border-radius: var(--radius-md);
  background: var(--bg-cool-50);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.06),
    0 1px 2px -1px rgba(0, 0, 0, 0.06);
}

.schedule-day-card.today {
  background: var(--brand-primary-bg);
  box-shadow:
    0 0 0 1px rgba(251, 123, 16, 0.22),
    0 1px 2px -1px rgba(0, 0, 0, 0.06);
}

.schedule-day-card.weak {
  background: #fff7e8;
}

.schedule-day-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px;
  color: var(--text-ink);
  font-size: 12px;
}

.schedule-day-head span {
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.capacity-meter {
  height: 6px;
  margin-top: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #edeff3;
}

.capacity-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-primary), var(--color-success));
}

.schedule-day-card p {
  margin: 7px 0 0;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.4;
}

.schedule-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 4px 0 10px;
}

.schedule-table-wrap {
  overflow-x: auto;
}

.schedule-grid {
  min-width: 1040px;
}

.schedule-grid .schedule-cell {
  min-width: 116px;
  height: 88px;
  padding: 8px;
  text-align: left;
}

.schedule-cell-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  min-height: 20px;
  color: var(--text-ink);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.schedule-cell-head em {
  flex: 0 0 auto;
  font-style: normal;
  color: #fff;
  background: var(--color-danger);
  border-radius: var(--radius-sm);
  padding: 1px 5px;
  font-size: 10px;
  font-weight: 600;
}

.schedule-track,
.schedule-time-track {
  position: relative;
  height: 18px;
  margin-top: 9px;
  border-radius: 999px;
  background: rgba(31, 35, 41, 0.07);
  overflow: hidden;
}

.schedule-shift-bar {
  position: absolute;
  top: 3px;
  bottom: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(30, 134, 111, 0.88), rgba(251, 123, 16, 0.78));
}

.schedule-appt-pin {
  position: absolute;
  top: 2px;
  width: 3px;
  height: 14px;
  border-radius: 999px;
  background: var(--brand-primary-active);
  box-shadow: 0 0 0 2px rgba(255, 243, 230, 0.96);
}

.schedule-cell-foot {
  margin-top: 7px;
  color: var(--text-secondary);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.schedule-grid .cell.empty .schedule-cell-head,
.schedule-grid .cell.rest .schedule-cell-head,
.schedule-grid .cell.leave .schedule-cell-head,
.schedule-grid .cell.sick .schedule-cell-head,
.schedule-grid .cell.maternity .schedule-cell-head {
  color: inherit;
}

.schedule-grid .cell.peak:not(.risk) {
  background: #fff8ec;
}

.schedule-grid .cell.risk {
  box-shadow: inset 0 0 0 1px rgba(187, 64, 82, 0.32);
}

.schedule-row-actions {
  text-align: center;
  white-space: nowrap;
}

.schedule-timeline {
  min-width: 1080px;
  display: grid;
  gap: 8px;
}

.schedule-time-axis {
  display: grid;
  grid-template-columns: 132px repeat(5, 1fr);
  gap: 8px;
  padding: 0 8px;
  color: var(--text-secondary);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.schedule-time-axis span:first-child {
  grid-column-start: 2;
}

.schedule-time-row {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 8px;
  align-items: stretch;
}

.schedule-time-who {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--bg-cool-50);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.schedule-time-who b {
  display: block;
  color: var(--text-ink);
  font-size: 13px;
}

.schedule-time-who span {
  display: block;
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.schedule-time-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.schedule-time-day {
  min-height: 66px;
  padding: 8px;
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
  cursor: pointer;
}

.schedule-time-day:hover {
  box-shadow:
    0 0 0 1px rgba(251, 123, 16, 0.32),
    0 2px 6px rgba(0, 0, 0, 0.06);
}

.schedule-time-day.rest,
.schedule-time-day.empty {
  background: #f7f8fa;
}

.schedule-time-day.leave {
  background: #fff8e8;
}

.schedule-time-day.sick,
.schedule-time-day.risk {
  background: #fff1f2;
}

.schedule-time-date {
  color: var(--text-secondary);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.schedule-time-off {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--text-secondary);
  font-size: 11px;
}

.schedule-editor-times {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.schedule-editor-hint {
  padding: 10px 12px;
  color: var(--text-secondary);
  background: var(--bg-cool-50);
  border-radius: var(--radius-md);
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 1320px) {
  .schedule-workbench {
    grid-template-columns: 1fr;
  }

  .schedule-day-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .schedule-day-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .schedule-editor-times {
    grid-template-columns: 1fr;
  }
}

/* 员工服务矩阵 */
.md-matrix {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  overflow: hidden;
  font-size: 12px;
}
.md-matrix th, .md-matrix td {
  border-right: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  padding: 6px;
  text-align: center;
  vertical-align: middle;
}
.md-matrix th:last-child, .md-matrix td:last-child { border-right: none; }
.md-matrix tr:last-child td { border-bottom: none; }
.md-matrix thead th {
  background: var(--bg-subtle, #FAFAFA);
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 2;
}
.md-matrix .who {
  text-align: left;
  padding-left: 12px;
  min-width: 100px;
  background: var(--bg-subtle, #FAFAFA);
  position: sticky;
  left: 0;
  z-index: 1;
}
.md-matrix .who .nm { font-weight: 600; font-size: 13px; }
.md-matrix .who .rl { font-size: 11px; color: var(--text-secondary); }
.md-matrix .batch-col { min-width: 80px; background: var(--bg-subtle, #FAFAFA); }
.md-matrix .svc-col { min-width: 90px; }
.md-matrix .svc-name { font-size: 12px; font-weight: 600; }
.md-matrix .svc-meta { font-size: 10px; color: var(--text-secondary); margin: 2px 0 2px; }

.md-matrix .cell {
  cursor: pointer;
  min-height: 48px;
  min-width: 56px;
  transition: background .15s;
  position: relative;
}
.md-matrix .cell.empty {
  background: #FFF;
  color: #C0C4CC;
}
.md-matrix .cell.ok.novice    { background: #ECF5FF; color: #1E6FFF; }
.md-matrix .cell.ok.advanced  { background: #F0F9EB; color: #5C8C3B; }
.md-matrix .cell.ok.master    { background: #FDF6EC; color: #B88230; font-weight: 600; }
.md-matrix .cell.star {
  background: #FFF3E6;
  color: #FB7B10;
  font-weight: 700;
}
.md-matrix .cell:hover {
  filter: brightness(0.97);
  outline: 1px dashed var(--brand-primary, #FB7B10);
  outline-offset: -2px;
}
.md-matrix .cell .lv {
  display: inline-block;
  width: 18px; height: 18px;
  line-height: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  font-size: 11px;
  font-weight: 600;
}
.md-matrix .cell .star {
  position: absolute;
  top: 2px; right: 4px;
  color: #FB7B10;
  font-size: 12px;
}

/* ==============================================
 * 门店列表 / 营业时间 / 设置 5 页共用样式（Phase 29）
 * ============================================== */

/* 营业时间 week 表格 */
.md-week-hours {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  overflow: hidden;
  font-size: 13px;
}
.md-week-hours th,
.md-week-hours td {
  padding: 8px 10px;
  border-right: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  text-align: left;
}
.md-week-hours th:last-child,
.md-week-hours td:last-child { border-right: none; }
.md-week-hours tr:last-child td { border-bottom: none; }
.md-week-hours thead th {
  background: var(--bg-subtle, #FAFAFA);
  font-weight: 600;
}
.md-week-hours tr.closed td { color: var(--text-placeholder); background: #FAFAFA; }
.md-week-hours tr.closed td:first-child { color: var(--text-secondary); }

/* 品牌 - 上传占位框 + 渠道绑定 */
.md-upload-stub {
  width: 140px; height: 140px;
  border: 2px dashed var(--border-light);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.6;
  overflow: hidden;
}
.md-upload-stub img { max-width: 100%; max-height: 100%; object-fit: contain; }
.md-bind-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px;
  background: var(--bg-subtle, #FAFAFA);
  border-radius: 8px;
  margin-bottom: 10px;
}
.md-bind-row:last-child { margin-bottom: 0; }
.md-bind-icon {
  width: 40px; height: 40px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 16px;
}
.md-bind-info { flex: 1; }
.md-bind-name { font-weight: 600; font-size: 14px; }
.md-bind-meta { font-size: 12px; color: var(--text-secondary); margin-top: 2px; font-family: ui-monospace, Menlo, monospace; }

/* 支付方式卡片网格 */
.md-pay-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 14px;
}
.md-pay-card {
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 14px;
  background: var(--bg-card, #fff);
  transition: all .15s;
}
.md-pay-card.off { opacity: 0.55; background: var(--bg-subtle, #FAFAFA); }
.md-pay-card .hd {
  display: flex; align-items: center; gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--border-light);
}
.md-pay-card .hd .ic {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700;
}
.md-pay-card .hd .nm { flex: 1; }
.md-pay-card .hd .nm .t { font-weight: 600; font-size: 14px; }
.md-pay-card .hd .nm .d { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.md-pay-card .bd { padding: 10px 0 6px; }
.md-pay-card .bd .row {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 8px;
  font-size: 13px;
}
.md-pay-card .bd .row .k { width: 60px; color: var(--text-secondary); flex-shrink: 0; }
.md-pay-card .bd .row .v { flex: 1; }
.md-pay-card .bd .row .v.md-pay-color-field {
  display: flex;
  align-items: center;
  gap: 8px;
}
.md-pay-card .bd .row .v.md-pay-color-field .el-input {
  max-width: 120px;
}
.md-pay-card .ft {
  display: flex; gap: 8px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-light);
}

/* 消息提醒矩阵 */
.md-notice-matrix {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  overflow: hidden;
  font-size: 13px;
}
.md-notice-matrix th, .md-notice-matrix td {
  padding: 10px 12px;
  border-right: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  text-align: center;
}
.md-notice-matrix th:first-child, .md-notice-matrix td:first-child { text-align: left; }
.md-notice-matrix th:last-child, .md-notice-matrix td:last-child { border-right: none; }
.md-notice-matrix tr:last-child td { border-bottom: none; }
.md-notice-matrix thead th { background: var(--bg-subtle, #FAFAFA); font-weight: 600; }
.md-notice-matrix tbody tr:hover { background: #FFF7EB; }
.md-notice-matrix td .meta { font-size: 11px; color: var(--text-secondary); margin-top: 2px; font-family: ui-monospace, Menlo, monospace; }
.md-tpl-hint { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }

/* 操作日志详情 - 复用现有 .dt-line（在 components.css 已有） */
.dt-line {
  display: flex; align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border-light);
  font-size: 13px;
}
.dt-line:last-child { border-bottom: none; }
.dt-line span:first-child {
  width: 90px; color: var(--text-secondary); flex-shrink: 0;
}
.dt-line b { flex: 1; word-break: break-all; }
.is-expired { color: var(--text-placeholder); text-decoration: line-through; }

/* ==============================================
 * 收银 4 页样式（Phase 30）
 * card-buy / recharge / refund / shifts
 * ============================================== */

/* 流程 stepper */
.md-stepper {
  display: flex; align-items: center;
  margin: 4px 0 18px;
  padding: 12px 20px;
  background: var(--bg-subtle, #FAFAFA);
  border-radius: 8px;
}
.md-stepper .step { display: flex; align-items: center; gap: 8px; }
.md-stepper .step .num {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #E0E0E0; color: #999;
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.md-stepper .step.active .num { background: var(--brand-primary); color: #fff; }
.md-stepper .step.done .num { background: var(--el-color-success); color: #fff; }
.md-stepper .step.done .num::before { content: '✓'; }
.md-stepper .step.done .num span { display: none; }
.md-stepper .step .label { font-size: 13px; color: var(--text-secondary); }
.md-stepper .step.active .label { color: var(--text-ink); font-weight: 600; }
.md-stepper .seg {
  flex: 1; height: 1px; background: #E0E0E0;
  margin: 0 16px;
}

/* 收银三栏 grid */
.md-cashier-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
}
.md-cashier-block {
  background: var(--bg-card, #fff);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  overflow: hidden;
  display: flex; flex-direction: column;
}
.md-cashier-block .hd {
  padding: 10px 14px;
  background: var(--bg-subtle, #FAFAFA);
  border-bottom: 1px solid var(--border-light);
  font-weight: 600; font-size: 13px;
  display: flex; justify-content: space-between; align-items: center;
}
.md-cashier-block .hd .meta { font-weight: 400; color: var(--text-secondary); font-size: 12px; }
.md-cashier-block .bd { padding: 14px; flex: 1; }

/* 客户选中后的小卡 */
.md-pick-card {
  background: #FFF7EB;
  padding: 10px 12px;
  border-radius: 6px;
  margin-top: 12px;
  font-size: 13px;
}
.md-pick-card .row {
  display: flex; align-items: center;
  padding: 4px 0;
}
.md-pick-card .row .k { width: 80px; color: var(--text-secondary); }

/* 双桶钱包 mini */
.md-wallet-mini {
  display: flex; gap: 8px; margin-top: 10px;
}
.md-wallet-mini .bucket {
  flex: 1;
  padding: 10px;
  border-radius: 6px;
  text-align: center;
}
.md-wallet-mini .bucket.principal { background: #FFF3E6; }
.md-wallet-mini .bucket.gift      { background: #FEF0F0; }
.md-wallet-mini .bucket .lb {
  display: block; font-size: 11px; color: var(--text-secondary); margin-bottom: 4px;
}

/* 卡包 grid */
.md-pkg-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  max-height: 420px; overflow-y: auto;
}
.md-pkg-card {
  border: 1.5px solid var(--border-light);
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all .15s;
  display: grid;
  grid-template-areas: "kind pr" "nm pr" "dt pr";
  grid-template-columns: 1fr auto;
  column-gap: 12px;
}
.md-pkg-card:hover { border-color: var(--brand-primary); }
.md-pkg-card.on { border-color: var(--brand-primary); background: #FFF7EB; box-shadow: 0 0 0 2px rgba(251, 123, 16, 0.1); }
.md-pkg-card.off { opacity: 0.45; cursor: not-allowed; }
.md-pkg-card .kind { grid-area: kind; }
.md-pkg-card .kind span {
  display: inline-block; padding: 1px 6px; border-radius: 3px;
  font-size: 11px; font-weight: 600;
}
.md-pkg-card .kind .k-count { background: #E8F1FF; color: #1E6FFF; }
.md-pkg-card .kind .k-value { background: #FFF3E6; color: var(--brand-primary); }
.md-pkg-card .kind .k-mixed { background: #F0F9EB; color: #67C23A; }
.md-pkg-card .nm { grid-area: nm; font-weight: 600; font-size: 14px; margin-top: 4px; }
.md-pkg-card .dt { grid-area: dt; font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.md-pkg-card .pr {
  grid-area: pr; align-self: center;
  font-size: 16px; font-weight: 700; color: var(--brand-primary);
}

/* 支付方式 radio */
.md-pay-radio {
  display: flex; flex-wrap: wrap; gap: 8px;
  justify-content: center;
}
.md-pay-radio > div {
  flex: 1; min-width: 90px;
  border: 1.5px solid var(--border-light); border-radius: 6px;
  padding: 10px 8px;
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-size: 13px;
  transition: all .15s;
}
.md-pay-radio > div:hover { border-color: var(--brand-primary); }
.md-pay-radio > div.on { border-color: var(--brand-primary); background: #FFF7EB; }
.md-pay-radio > div.off { opacity: 0.45; cursor: not-allowed; }
.md-pay-radio > div .ic {
  width: 28px; height: 28px; border-radius: 6px;
  color: #fff; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* 充值送活动 cards */
.md-activity-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.md-act-card {
  border: 1.5px solid var(--border-light);
  border-radius: 6px;
  padding: 8px 10px;
  cursor: pointer;
  transition: all .15s;
}
.md-act-card:hover { border-color: var(--brand-primary); }
.md-act-card.on { border-color: var(--brand-primary); background: linear-gradient(135deg, #FFF7EB, #FFE2C2); }
.md-act-card.off { opacity: 0.5; }
.md-act-card .nm { font-weight: 600; font-size: 13px; }
.md-act-card .dt { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }

/* 充值汇总 */
.md-recharge-summary {
  background: #FFF7EB;
  padding: 12px 14px;
  border-radius: 6px;
  margin-top: 14px;
  font-size: 13px;
}
.md-recharge-summary .row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 4px 0;
}
.md-recharge-summary .row .k { color: var(--text-secondary); }
.md-recharge-summary .sep {
  height: 1px; background: var(--border-light); margin: 6px 0;
}

/* KPI 行 */
.md-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.md-kpi {
  background: var(--bg-card, #fff);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 12px 16px;
}
.md-kpi .lb { font-size: 12px; color: var(--text-secondary); margin-bottom: 4px; }
.md-kpi .vl { font-size: 18px; font-weight: 700; }
.md-kpi .vl.neg { color: var(--el-color-danger); }
.md-kpi .vl.pos { color: var(--brand-primary); }

/* 班次详情收款表 */
.md-shift-revenue {
  width: 100%;
  border-collapse: separate; border-spacing: 0;
  border: 1px solid var(--border-light);
  border-radius: 6px; overflow: hidden;
  font-size: 13px;
}
.md-shift-revenue th, .md-shift-revenue td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-light);
}
.md-shift-revenue tr:last-child td { border-bottom: none; }
.md-shift-revenue thead th, .md-shift-revenue th { background: var(--bg-subtle, #FAFAFA); font-weight: 600; }
.md-shift-revenue .sum td { background: #FFF7EB; font-weight: 700; }

/* ==============================================
 * 营销 4 页样式（Phase 31）
 * ============================================== */

/* 券类型 chip */
.md-coupon-kind {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  margin-right: 6px;
}
.md-coupon-kind.k-amount_off     { background: #FFE2C2; color: var(--brand-primary); }
.md-coupon-kind.k-percent_off    { background: #FEF0F0; color: #F56C6C; }
.md-coupon-kind.k-service_voucher{ background: #E8F1FF; color: #1E6FFF; }
.md-coupon-kind.k-gift_item      { background: #F0F9EB; color: #67C23A; }
.md-coupon-kind.k-mixed          { background: #FFF7EB; color: #E6A23C; }

/* 抢购卡片网格 */
.md-seckill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 14px;
}
.md-seckill-card {
  background: var(--bg-card, #fff);
  border: 1.5px solid var(--border-light);
  border-radius: 10px;
  padding: 14px;
  display: flex; flex-direction: column;
  transition: all .15s;
}
.md-seckill-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.md-seckill-card.st-ongoing { border-color: var(--brand-primary); background: linear-gradient(180deg, #FFF7EB 0%, #fff 30%); }
.md-seckill-card.st-cancelled, .md-seckill-card.st-ended { opacity: 0.7; }

.md-seckill-card .hd {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--border-light);
}
.md-seckill-card .hd .nm b { font-size: 15px; }
.md-seckill-card .hd .meta { font-size: 11px; color: var(--text-secondary); margin-top: 2px; font-family: ui-monospace, Menlo, monospace; }

.md-seckill-card .price {
  padding: 12px 0;
  display: flex; align-items: baseline; gap: 14px;
  border-bottom: 1px dashed var(--border-light);
}
.md-seckill-card .price .seckill { font-weight: 700; color: var(--brand-primary); font-size: 14px; }
.md-seckill-card .price .seckill .md-money { font-size: 24px; }
.md-seckill-card .price .orig { font-size: 12px; color: var(--text-secondary); }
.md-seckill-card .price .off { font-size: 12px; color: var(--el-color-danger); margin-left: auto; }

.md-seckill-card .stock {
  padding: 12px 0;
  border-bottom: 1px dashed var(--border-light);
}
.md-seckill-card .stock .bar {
  width: 100%; height: 8px;
  background: #F0F2F5;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.md-seckill-card .stock .bar .fill {
  position: absolute; top: 0; bottom: 0;
  transition: width .3s;
}
.md-seckill-card .stock .bar .fill.sold { left: 0; background: var(--brand-primary); }
.md-seckill-card .stock .bar .fill.reserved { left: 0; background: #E6A23C; opacity: 0.5; }
.md-seckill-card .stock .legend {
  display: flex; gap: 12px; margin-top: 6px;
  font-size: 12px; color: var(--text-secondary);
}

.md-seckill-card .schedule {
  padding: 10px 0;
  font-size: 12px;
  border-bottom: 1px dashed var(--border-light);
}
.md-seckill-card .schedule > div { margin-bottom: 4px; }
.md-seckill-card .schedule .k { color: var(--text-secondary); margin-right: 8px; }

.md-seckill-card .metrics {
  display: flex; gap: 16px;
  padding: 10px 0;
}
.md-seckill-card .metrics > div { flex: 1; text-align: center; }
.md-seckill-card .metrics .lb { display: block; font-size: 11px; color: var(--text-secondary); }
.md-seckill-card .metrics b { font-size: 16px; }

.md-seckill-card .ops {
  display: flex; gap: 8px; justify-content: flex-end;
  padding-top: 6px;
  border-top: 1px dashed var(--border-light);
}

/* 已过期文字 */
.overdue { color: var(--el-color-danger) !important; font-weight: 600; }

/* 财务资产中心 · 分店统计合计行（置底高亮加粗） */
.md-total-row td { background: var(--bg-gray-50, #FAFAFA) !important; font-weight: 700; }

/* 会员价矩阵 · 单元格（DS-AD1 页 2） */
.mpx-cell {
  cursor: pointer;
  border-radius: 8px;
  padding: 6px 4px;
  transition: background 0.15s, box-shadow 0.15s;
  min-height: 40px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.mpx-cell:hover { background: var(--bg-gray-50, #FAFAFA); box-shadow: inset 0 0 0 1px var(--brand-primary, #FB7B10); }
.mpx-cell.is-empty { color: var(--text-placeholder, #C0C4CC); }
.mpx-cell.is-disabled { opacity: 0.6; }
.mpx-cell .mpx-price { font-weight: 700; font-size: 13px; }
.mpx-cell .mpx-meta { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }
.mpx-cell .mpx-add { font-size: 12px; color: var(--text-placeholder, #C0C4CC); }
.mpx-cell:hover .mpx-add { color: var(--brand-primary, #FB7B10); }

/* 权益卡编辑 · 左栏卡模板列表（DS-AD2 页 1） */
.cb-col-title { font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 10px; }
.cb-pkg-col { border-right: 1px solid var(--border-light, #EBEEF5); padding-right: 8px; }
.cb-pkg-item {
  border: 1px solid var(--border-light, #EBEEF5);
  border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.cb-pkg-item:hover { background: var(--bg-gray-50, #FAFAFA); }
.cb-pkg-item.active {
  border-color: var(--brand-primary, #FB7B10);
  box-shadow: inset 0 0 0 1px var(--brand-primary, #FB7B10);
  background: #FFF6EB;
}
.cb-pkg-name { font-weight: 600; font-size: 14px; margin-bottom: 6px; line-height: 1.3; }
.cb-pkg-meta { display: flex; align-items: center; gap: 8px; }
.cb-pkg-cnt { font-size: 12px; color: var(--text-secondary); }

/* 批量改价 · 统一调价工具条（DS-AD2 页 2） */
.bp-bulk-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  background: var(--bg-gray-50, #FAFAFA);
  border: 1px solid var(--border-light, #EBEEF5);
  border-radius: 8px; padding: 10px 12px; margin-bottom: 14px;
}
.bp-bulk-lb { font-size: 13px; font-weight: 600; color: var(--text-regular); }

/* 老会员导入 · 校验失败行高亮 */
.el-table .import-row-bad td.el-table__cell { background: rgba(208, 48, 80, 0.06); }

/* 老带新 · 阶梯奖励配置 */
.ref-tier-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ref-tier-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  background: var(--bg-gray-50, #FAFAFA);
}

.ref-tier-prefix {
  color: var(--text-secondary);
  font-size: 13px;
}

/* 应用列表 · 营销玩法 / 应用功能能力网格 */
.app-list-page .page-body {
  padding-top: 18px;
}

.app-list-count {
  color: var(--text-secondary);
  font-size: 12px;
  white-space: nowrap;
}

.app-list-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.app-list-search {
  width: 260px;
}

.app-list-hint {
  color: var(--text-secondary);
  font-size: 12px;
}

.app-list-section {
  margin-bottom: 28px;
}

.app-list-section:last-child {
  margin-bottom: 0;
}

.app-list-section-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
}

.app-list-section-head b {
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 700;
}

.app-list-section-head span {
  color: var(--text-secondary);
  font-size: 13px;
}

.app-feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 14px 16px;
}

.app-feature-card {
  position: relative;
  min-height: 84px;
  padding: 18px 18px 16px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: #F6F7FA;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  overflow: hidden;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .15s;
}

.app-feature-card:hover {
  background: #fff;
  border-color: var(--brand-primary);
  box-shadow: 0 8px 22px rgba(31, 35, 41, 0.10);
  transform: translateY(-1px);
}

.app-feature-card.is-dev {
  cursor: default;
  background: #F8F8FA;
}

.app-feature-card.is-dev:hover {
  border-color: #F3C5C5;
  box-shadow: none;
  transform: none;
}

.app-feature-card.is-dev .app-feature-main {
  opacity: .76;
}

.app-feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 9px;
  background: #FF4D4F;
  color: #fff;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .08);
}

.app-feature-card.is-dev .app-feature-icon {
  background: #F56C6C;
  opacity: .78;
}

.app-feature-main {
  min-width: 0;
}

.app-feature-name {
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-feature-desc {
  margin-top: 5px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.app-ribbon,
.app-dev-tag {
  position: absolute;
  top: 0;
  right: 0;
  padding: 3px 7px;
  color: #fff;
  font-size: 11px;
  line-height: 1.2;
  border-bottom-left-radius: 3px;
}

.app-ribbon {
  background: #E6A23C;
}

.app-dev-tag {
  background: #F56C6C;
}

.app-list-empty {
  min-height: 260px;
}

@media (max-width: 1440px) {
  .app-feature-grid {
    grid-template-columns: repeat(3, minmax(220px, 1fr));
  }
}

@media (max-width: 1100px) {
  .app-feature-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
}

@media (max-width: 760px) {
  .app-list-tools {
    align-items: flex-start;
    flex-direction: column;
  }
  .app-list-search {
    width: 100%;
  }
  .app-feature-grid {
    grid-template-columns: 1fr;
  }
}
