/* 抖音直播数据 · 原型样式（对齐客服录音系统壳层） */
.icon-btn { display: inline-flex; align-items: center; justify-content: center; }
.custom-scrollbar::-webkit-scrollbar { width: 6px; height: 6px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background-color: #d1d5db; border-radius: 10px; }

.tab-active-curve::before {
  content: "";
  position: absolute; bottom: 0; left: -16px; width: 16px; height: 16px;
  background: radial-gradient(circle at 0% 0%, transparent 16px, #eef4ff 16px);
  pointer-events: none;
}
.tab-active-curve::after {
  content: "";
  position: absolute; bottom: 0; right: -16px; width: 16px; height: 16px;
  background: radial-gradient(circle at 100% 0%, transparent 16px, #eef4ff 16px);
  pointer-events: none;
}

/* 数据看板 · 数据分析后台风格 */
.dash-analytics-shell {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #eef0f3;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}
.dash-analytics-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid #f5f5f5;
}
.dash-analytics-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.3;
}
.dash-analytics-subtitle {
  margin: 4px 0 0;
  font-size: 12px;
  color: #999;
  line-height: 1.5;
}
.dash-analytics-period {
  margin: 6px 0 0;
  font-size: 12px;
  color: #666;
}
.dash-analytics-period::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: #52c41a;
  vertical-align: middle;
}
.dash-analytics-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.dash-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 14px;
  font-size: 13px;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.dash-btn--ghost {
  background: #fff;
  border-color: #e8e8e8;
  color: #666;
}
.dash-btn--ghost:hover { color: #1890FF; border-color: #91caff; background: #f0f7ff; }
.dash-btn--primary {
  background: #1890FF;
  border-color: #1890FF;
  color: #fff;
}
.dash-btn--primary:hover { background: #40a9ff; border-color: #40a9ff; }
.dash-analytics-tabs-wrap { padding: 0 16px 12px; }
.dash-analytics-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: #f5f6f8;
  border-radius: 8px;
}
.dash-nav-tab {
  flex: 1;
  min-width: 0;
  text-align: center;
  padding: 8px 10px;
  font-size: 13px;
  color: #666;
  text-decoration: none;
  border-radius: 6px;
  transition: background .15s, color .15s, box-shadow .15s;
  white-space: nowrap;
}
.dash-nav-tab:hover { color: #1890FF; }
.dash-nav-tab.is-active {
  background: #fff;
  color: #1890FF;
  font-weight: 500;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}
.dash-analytics-filters {
  padding: 0 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-bottom: 1px solid #f5f5f5;
}
.dash-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px 20px;
}
.dash-filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.dash-filter-group--grow { flex: 1; min-width: 200px; }
.dash-filter-label {
  font-size: 11px;
  font-weight: 500;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.dash-segment {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 3px;
  background: #f5f6f8;
  border-radius: 8px;
  border: 1px solid #eef0f3;
}
.dash-segment-btn {
  padding: 6px 14px;
  font-size: 12px;
  color: #666;
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, color .15s, box-shadow .15s;
}
.dash-segment-btn:hover { color: #1890FF; }
.dash-segment-btn.is-active {
  background: #fff;
  color: #1890FF;
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}
.dash-filter-pills-scroll {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}
.dash-filter-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
}
.dash-select {
  height: 32px;
  min-width: 120px;
  padding: 0 10px;
  font-size: 12px;
  color: #333;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  outline: none;
}
.dash-select:focus { border-color: #91caff; }
#dash-extra-filters:empty { display: none; }
.dash-filter-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  font-size: 12px;
  line-height: 1.25;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  background: #f7f7fa;
  color: #666;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color .15s, background .15s;
}
.dash-filter-pill.is-active {
  background: #eef4ff;
  color: #1890FF;
  font-weight: 500;
}
.dash-filter-pill:hover:not(.is-active) { color: #1890FF; background: #eef4ff; }
.dash-filter-pill--room {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.live-room-pill {
  display: inline-flex; align-items: center; max-width: 240px;
  padding: 6px 12px; font-size: 12px; border-radius: 6px; cursor: pointer;
  background: #f7f7fa; color: #666; border: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  flex-shrink: 0;
  transition: color .15s, background .15s;
}
.live-room-pill.is-active {
  background: #eef4ff; color: #1890FF; font-weight: 500;
}
.live-room-pill:hover:not(.is-active) { color: #1890FF; background: #eef4ff; }
.dash-kpi-section {
  padding: 12px 16px 16px;
  background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
}
.dash-kpi-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.dash-kpi-section-title {
  font-size: 13px;
  font-weight: 600;
  color: #333;
}
.dash-kpi-section-hint {
  font-size: 11px;
  color: #999;
}
.dash-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 1280px) {
  .dash-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.dash-kpi-card {
  background: #fff;
  border: 1px solid #eef0f3;
  border-radius: 10px;
  padding: 12px 14px;
  min-width: 0;
  transition: box-shadow .15s, border-color .15s;
}
.dash-kpi-card:hover {
  border-color: #d9e8ff;
  box-shadow: 0 4px 12px rgba(24, 144, 255, 0.06);
}
.dash-kpi-card--primary {
  border-color: rgba(24, 144, 255, 0.28);
  background: linear-gradient(135deg, #f0f7ff 0%, #fff 72%);
}
.dash-kpi-label {
  font-size: 12px;
  color: #999;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-kpi-value {
  font-size: 22px;
  font-weight: 600;
  color: #1a1a1a;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  white-space: nowrap;
}
.dash-kpi-card--primary .dash-kpi-value { color: #1890FF; }
.dash-kpi-prefix {
  font-size: 14px;
  font-weight: 500;
  margin-right: 2px;
  color: #999;
}
.dash-kpi-card--primary .dash-kpi-prefix { color: #69b1ff; }
.dash-kpi-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 11px;
  min-height: 16px;
}
.dash-kpi-trend--up { color: #52c41a; font-weight: 500; }
.dash-kpi-trend--down { color: #ff4d4f; font-weight: 500; }
.dash-kpi-trend--flat { color: #999; }
.dash-kpi-foot-hint { color: #bbb; }
.dash-kpi-sub { color: #999; }
.dash-table-card {
  flex: 1;
  min-height: 0;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #eef0f3;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.live-table-wrap {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  padding: 0 16px 12px;
}
.live-table-scroll {
  min-height: 0;
  max-width: 100%;
  flex: 1;
  overflow-x: auto;
  overflow-y: auto;
  border-radius: 8px;
  border: 1px solid #f0f0f0;
}
.dash-table-card-head {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid #f5f5f5;
  background: #fafbfc;
}
.dash-table-card-title {
  font-size: 13px;
  font-weight: 600;
  color: #333;
}
.dash-table-card-meta {
  font-size: 11px;
  color: #999;
}

.dashboard-stub {
  flex: 1; display: flex; align-items: center; justify-content: center;
  color: #999; font-size: 14px; min-height: 240px;
}

/* 品牌 Tab / 列表表（对齐客服录音系统） */
.cs-brand-tab {
  display: flex; align-items: center; padding: 10px 20px; font-size: 13px;
  border-radius: 8px 8px 0 0; transition: color .15s, background .15s, border-color .15s;
  border: 1px solid transparent; background: #F2F3F5; color: #1a1a1a; cursor: pointer;
}
.cs-brand-tab:hover:not(.cs-brand-tab-active) { background: #e8e9eb; }
.cs-brand-tab-active {
  background: #fff; color: #1890FF; font-weight: 500;
  border-color: #f0f0f0; border-bottom-color: #fff; margin-bottom: -1px; position: relative; z-index: 10;
}
.cs-table thead th {
  white-space: nowrap;
  border-bottom: 1px solid #f0f0f0;
  padding: 12px 8px;
  font-weight: 500;
  color: #666;
  background: #fbfbfb;
}
.cs-table tbody td {
  border-bottom: 1px solid #f4f5f7;
  padding: 10px 8px;
  color: #333;
}
.cs-table tbody tr:hover { background: #fafafa; }

/* 直播排班：无外部描边，保留单元格内线，固定列宽对齐 */
.schedule-table {
  border: none;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 1480px;
}
.schedule-col-idx { width: 52px; }
.schedule-col-name { width: 80px; }
.schedule-col-role { width: 64px; }
.schedule-col-hour { width: 52px; }
.schedule-table thead th,
.schedule-table tbody td {
  padding: 6px 4px;
  text-align: center;
  vertical-align: middle;
  box-sizing: border-box;
  overflow: hidden;
}
.schedule-table thead th {
  font-weight: 500;
  color: #666;
  background: #fbfbfb;
  border-bottom: 1px solid #f0f0f0;
}
.schedule-table tbody td {
  border-bottom: 1px solid #f0f0f0;
}
.schedule-table tbody tr:hover { background: transparent; }
.schedule-table .schedule-row--ctrl-start td { padding-top: 12px; }
.schedule-table .schedule-sticky-idx,
.schedule-table .schedule-sticky-name,
.schedule-table .schedule-sticky-role {
  position: sticky;
  z-index: 12;
  background: #fff;
}
.schedule-table thead .schedule-sticky-idx,
.schedule-table thead .schedule-sticky-name,
.schedule-table thead .schedule-sticky-role {
  z-index: 22;
  background: #fbfbfb;
}
.schedule-table .schedule-sticky-idx { left: 0; width: 52px; min-width: 52px; max-width: 52px; }
.schedule-table .schedule-sticky-name { left: 52px; width: 80px; min-width: 80px; max-width: 80px; }
.schedule-table .schedule-sticky-role { left: 132px; width: 64px; min-width: 64px; max-width: 64px; }
.schedule-table .live-sched-cell {
  min-width: 0;
  width: 100%;
  height: 28px;
  margin: 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-sizing: border-box;
}

/* 排班筛选 · 选项卡组 */
.schedule-segment-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.schedule-seg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 14px;
  box-sizing: border-box;
  font-size: 13px;
  line-height: 1;
  color: #666;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: color .15s, background .15s, border-color .15s;
}
.schedule-seg-btn:hover:not(.is-active) { color: #1890FF; border-color: #d6e8ff; }
.schedule-seg-btn.is-active {
  font-weight: 500;
}
#schedule-role-tabs .schedule-seg-btn.is-active {
  background: #eef4ff;
  color: #1890FF;
  border-color: #91caff;
}
.schedule-seg-btn--on.is-active {
  background: #e6f4ff;
  color: #1890FF;
  border-color: #91caff;
}
.schedule-seg-btn--off.is-active {
  background: #fafafa;
  color: #999;
  border-color: #d9d9d9;
}
.schedule-seg-btn--leave.is-active {
  background: #fff7e6;
  color: #d48806;
  border-color: #ffd591;
}
.schedule-seg-btn--clear.is-active {
  background: #fff;
  color: #666;
  border-color: #1890FF;
}

/* 排班页 · 直播间 pills 与选项卡同高（30px） */
#schedule-filter-bar #live-room-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 30px;
}
#schedule-filter-bar #live-room-pills .dash-filter-pill {
  height: 30px;
  padding: 0 14px;
  font-size: 13px;
  line-height: 1;
  border: 1px solid #e8e8e8;
  background: #fff;
  box-sizing: border-box;
}
#schedule-filter-bar #live-room-pills .dash-filter-pill.is-active {
  background: #eef4ff;
  color: #1890FF;
  border-color: #91caff;
  font-weight: 500;
}
#schedule-filter-bar #live-room-pills .dash-filter-pill:hover:not(.is-active) {
  color: #1890FF;
  border-color: #d6e8ff;
  background: #fff;
}

.live-sched-cell {
  min-width: 44px; height: 32px; border-radius: 4px; font-size: 11px;
  cursor: pointer; border: 1px solid #f0f0f0; transition: background .15s;
}
.live-sched-cell[data-state="on"] { background: #e6f4ff; color: #1890FF; border-color: #91caff; }
.live-sched-cell[data-state="off"] { background: #fafafa; color: #bbb; }
.live-sched-cell[data-state="leave"] { background: #fff7e6; color: #d48806; border-color: #ffd591; }

.analytics-th-group {
  font-weight: 500; color: #666; background: #fbfbfb;
  border-bottom: 1px solid #f0f0f0; padding: 8px; font-size: 12px;
}
.analytics-th-group.meta { border-top: 2px solid #a8a29e; }
.analytics-th-group.base { border-top: 2px solid #60a5fa; }
.analytics-th-group.order { border-top: 2px solid #ec4899; }
.analytics-th-group.conv { border-top: 2px solid #10b981; }
.analytics-th-key { color: #1890FF !important; font-weight: 600; box-shadow: inset 0 2px 0 #1890FF; }
tr.row-summary { background: #f8fafc !important; font-weight: 500; }
tr.row-summary td { border-top: 2px solid #e8e8e8; }

.live-toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,.78); color: #fff; padding: 10px 18px; border-radius: 8px;
  font-size: 13px; z-index: 9999; pointer-events: none; opacity: 0; transition: opacity .2s;
}
.live-toast.is-show { opacity: 1; }

.tag-ok { color: #52c41a; }
.tag-warn { color: #faad14; }
.tag-err { color: #ff4d4f; }

.live-tag {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 3.25rem; padding: 1px 8px; border-radius: 4px;
  font-size: 12px; border: 1px solid; white-space: nowrap; box-sizing: border-box;
}
.live-tag--ok { color: #52c41a; background: #f6ffed; border-color: #b7eb8f; }
.live-tag--info { color: #1890FF; background: #e6f4ff; border-color: #91caff; }
.live-tag--warn { color: #faad14; background: #fffbe6; border-color: #ffe58f; }
.live-tag--err { color: #ff4d4f; background: #fff1f0; border-color: #ffccc7; }
.live-tag--no { color: #999; background: #fafafa; border-color: #e8e8e8; }
.live-tag--na { color: #999; background: transparent; border-color: transparent; min-width: 3.25rem; }

.drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 400;
}
.drawer-overlay.is-open { display: block; }
.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  cursor: pointer;
}
.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(96vw, 1080px);
  min-width: min(96vw, 880px);
  background: #fff;
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
  border-left: 1px solid #e5e5e5;
  overflow: hidden;
}
.drawer-close {
  position: absolute;
  top: 10px;
  right: 16px;
  z-index: 2;
  border: none;
  background: none;
  font-size: 22px;
  line-height: 1;
  color: #999;
  cursor: pointer;
  padding: 4px;
}
.drawer-close:hover { color: #666; }
.drawer-summary {
  flex-shrink: 0;
  padding: 12px 20px;
  padding-right: 56px;
  background: #fafafa;
  border-bottom: 1px solid #f0f0f0;
  font-size: 13px;
  line-height: 1.6;
  color: #666;
}
.drawer-detail-header { display: flex; flex-direction: column; gap: 8px; }
.drawer-header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.drawer-header-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.drawer-header-divider {
  width: 1px;
  height: 16px;
  background: #e5e5e5;
  flex-shrink: 0;
}
.drawer-header-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  font-size: 13px;
  min-width: 0;
}
.drawer-header-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.drawer-header-meta-item--order .drawer-header-meta-value { font-weight: 500; color: #333; }
.drawer-header-meta-label { color: #666; }
.drawer-header-meta-value { color: #333; }
.drawer-copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  margin-left: 2px;
  border: none;
  background: none;
  color: #1890FF;
  cursor: pointer;
  border-radius: 4px;
}
.drawer-copy-btn:hover { background: rgba(24, 144, 255, 0.1); }
.drawer-status-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  border: 1px solid;
  white-space: nowrap;
}
.drawer-status-tag--success { color: #52c41a; background: #f6ffed; border-color: #b7eb8f; }
.drawer-status-tag--info { color: #1890FF; background: #e6f4ff; border-color: #91caff; }
.drawer-status-tag--warn { color: #faad14; background: #fffbe6; border-color: #ffe58f; }
.drawer-status-tag--pending { color: #ff4d4f; background: #fff1f0; border-color: #ffccc7; }
.drawer-status-tag--default { color: #666; background: #fafafa; border-color: #e8e8e8; }
.drawer-tabbar {
  display: flex;
  align-items: flex-end;
  gap: 24px;
  padding: 12px 20px 0;
  border-bottom: 1px solid #e8e8e8;
  background: #fff;
  flex-shrink: 0;
}
.drawer-tab {
  padding: 0 0 10px;
  margin-bottom: -1px;
  font-size: 13px;
  border: none;
  border-bottom: 2px solid transparent;
  background: none;
  color: #666;
  cursor: pointer;
  white-space: nowrap;
}
.drawer-tab:hover { color: #333; }
.drawer-tab.is-active {
  color: #1890FF;
  border-bottom-color: #1890FF;
  font-weight: 500;
}
.drawer-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}
.drawer-body { padding: 20px; font-size: 13px; line-height: 1.6; }
.drawer-panel-section.is-hidden { display: none; }
.drawer-section { margin-bottom: 24px; }
.drawer-section:last-child { margin-bottom: 0; }
.drawer-section-head {
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f0f0f0;
}
.drawer-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
}
.drawer-section-bar {
  width: 2px;
  height: 16px;
  border-radius: 999px;
  background: #1890FF;
  flex-shrink: 0;
}
.drawer-desc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 40px;
  margin: 0;
  padding-left: 6px;
}
.drawer-desc-item { min-width: 0; }
.drawer-desc-item--wide { grid-column: 1 / -1; }
.drawer-desc-label {
  font-size: 12px;
  color: #999;
  margin-bottom: 4px;
}
.drawer-desc-value {
  font-size: 13px;
  color: #333;
  line-height: 1.5;
  word-break: break-word;
}
.drawer-money { color: #1890FF; font-weight: 500; }
.drawer-empty-note {
  padding: 24px 16px;
  text-align: center;
  font-size: 13px;
  color: #999;
  border: 1px dashed #e8e8e8;
  border-radius: 8px;
  background: #fafafa;
}
.drawer-log-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.drawer-log-item {
  display: flex;
  gap: 16px;
  padding: 12px 6px;
  border-bottom: 1px solid #f5f5f5;
  font-size: 13px;
}
.drawer-log-item:last-child { border-bottom: none; }
.drawer-log-time {
  flex-shrink: 0;
  width: 148px;
  color: #999;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.drawer-log-text { color: #333; }

