/* 播姿 OPS 自定义样式  蓝色品牌 + 灰色背景，贴近原图风格 */

:root {
  --brand: #1677ff;
  --brand-light: #e6f4ff;
  --brand-soft: #f0f7ff;
  --bg: #f5f7fa;
  --bg-2: #eef0f3;
  --text: #1f2329;
  --text-2: #4e5969;
  --text-3: #86909c;
  --border: #e5e6eb;
  --success: #00b42a;
  --warning: #ff7d00;
  --danger:  #f53f3f;
  --gray-bg: #f7f8fa;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow:    0 2px 8px rgba(0,0,0,0.06);
  --sidebar-w: 196px;
  --header-h:  56px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }

/* 顶部红色警示条（模仿原图） */
.top-banner {
  height: 4px;
  background: linear-gradient(to right, #ff385c 0%, #ff6688 100%);
}

/* ---------- 头部 ---------- */
.app-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
  display: flex;
  align-items: center;
  padding: 0 24px 0 calc(var(--sidebar-w) + 24px);
  position: sticky;
  top: 0;
  z-index: 50;
}
.app-logo {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--sidebar-w);
  height: var(--header-h);
  background: var(--brand);
  display: flex;
  align-items: center;
  padding-left: 18px;
  color: #fff;
  font-weight: 600;
  font-size: 16px;
}
.app-logo .dot {
  width: 28px; height: 28px;
  border-radius: 6px;
  background: #fff;
  color: var(--brand);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  font-size: 16px;
}
.app-logo small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  opacity: 0.8;
  margin-top: 2px;
  letter-spacing: 1px;
}
.app-logo .lb {
  display: flex;
  flex-direction: column;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.header-actions .btn-ghost {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-2);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
}
.header-actions .btn-ghost:hover { color: var(--brand); border-color: var(--brand); }
.header-actions .btn-primary {
  background: var(--brand);
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
}
.header-actions .btn-primary:hover { background: #0f6dd9; }
.bell { position: relative; cursor: pointer; padding: 6px 8px; }
.bell::after {
  content: '';
  position: absolute;
  top: 6px; right: 6px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--danger);
}
.user-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  margin-left: 6px;
}

/* ---------- 布局 ---------- */
.app-layout {
  display: flex;
  min-height: calc(100vh - var(--header-h));
  padding-top: var(--header-h);
  position: relative;
}

/* ---------- 侧边栏 ---------- */
.sidebar {
  position: fixed;
  left: 0; top: var(--header-h);
  width: var(--sidebar-w);
  height: calc(100vh - var(--header-h));
  background: #fff;
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 12px 0 24px 0;
  z-index: 40;
}
.sidebar .group-label {
  font-size: 11px;
  color: var(--text-3);
  padding: 14px 18px 6px;
  letter-spacing: 0.5px;
}
.sidebar .nav-item {
  display: flex;
  align-items: center;
  padding: 10px 18px;
  color: var(--text-2);
  cursor: pointer;
  font-size: 14px;
  border-left: 3px solid transparent;
  transition: all 0.15s;
}
.sidebar .nav-item:hover {
  background: var(--brand-soft);
  color: var(--brand);
}
.sidebar .nav-item.active {
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 500;
  border-left-color: var(--brand);
}
.sidebar .nav-item .ico {
  width: 18px;
  margin-right: 10px;
  display: inline-block;
  text-align: center;
  color: inherit;
}

.sidebar .shop-picker {
  margin: 4px 12px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 13px;
  background: #fafafa;
}
.sidebar .shop-picker select {
  width: 100%;
  border: none;
  background: transparent;
  font-size: 13px;
  outline: none;
  color: var(--text);
  cursor: pointer;
}

/* ---------- 主区 ---------- */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 16px 20px 32px;
}
.motivation-banner {
  position: sticky;
  top: 8px;
  z-index: 8;
  isolation: isolate;
  width: 100%;
  min-height: 148px;
  margin: 0 0 14px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 42px;
  border: 1px solid rgba(117, 149, 205, .34);
  border-radius: 12px;
  background:
    radial-gradient(circle at 78% 30%, rgba(74, 127, 255, .28), transparent 28%),
    radial-gradient(circle at 18% 120%, rgba(0, 198, 255, .18), transparent 34%),
    linear-gradient(112deg, #101a35 0%, #182a50 48%, #0c1731 100%);
  box-shadow: 0 12px 30px rgba(28, 53, 101, .16), inset 0 1px 0 rgba(255,255,255,.12);
  color: #fff;
}
.motivation-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(105deg, transparent 0 43%, rgba(112, 165, 255, .13) 43.2% 43.5%, transparent 43.7% 100%);
  pointer-events: none;
}
.motivation-banner::after {
  content: '';
  position: absolute;
  left: 42px;
  bottom: 18px;
  width: 88px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, #68d9ff, #7a8cff);
  box-shadow: 0 0 16px rgba(104, 217, 255, .7);
}
.motivation-banner__grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .23;
  background-image: linear-gradient(rgba(171, 204, 255, .12) 1px, transparent 1px), linear-gradient(90deg, rgba(171, 204, 255, .12) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(90deg, rgba(0,0,0,.8), transparent 88%);
  pointer-events: none;
}
.motivation-banner__orb {
  position: absolute;
  z-index: -1;
  border: 1px solid rgba(158, 201, 255, .22);
  border-radius: 50%;
  pointer-events: none;
}
.motivation-banner__orb--one { width: 220px; height: 220px; right: 16%; top: -126px; box-shadow: 0 0 0 18px rgba(124, 167, 255, .035), 0 0 0 42px rgba(124, 167, 255, .025); }
.motivation-banner__orb--two { width: 120px; height: 120px; right: 8%; bottom: -82px; border-color: rgba(104, 217, 255, .18); }
.motivation-banner__content { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.motivation-banner__eyebrow { color: #8fdcff; font-size: 11px; font-weight: 700; letter-spacing: 2.6px; }
.motivation-banner__headline { display: block; font-size: clamp(25px, 3vw, 38px); line-height: 1.2; letter-spacing: 4px; font-weight: 700; text-shadow: 0 3px 20px rgba(0, 0, 0, .25); }
.motivation-banner__subline { color: rgba(234, 244, 255, .72); font-size: 13px; letter-spacing: 1.6px; }
.motivation-banner__side { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 7px; margin-left: 28px; color: rgba(224, 239, 255, .62); }
.motivation-banner__side-label { font-size: 10px; letter-spacing: 2px; }
.motivation-banner__side-line { width: 74px; height: 1px; background: linear-gradient(90deg, transparent, #7edfff); }
.motivation-banner__side-text { font-size: 12px; letter-spacing: 1px; color: #b7d7ff; }

/* 面包屑 */
.crumbs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.crumbs h1 {
  font-size: 18px;
  margin: 0;
  font-weight: 600;
}
.crumbs .route-trail {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 4px;
}

/* ---------- 顶部店铺 tab + 时间筛选 ---------- */
.shop-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  background: #fff;
  padding: 6px 12px 0;
  border-radius: 8px 8px 0 0;
  position: relative;
}
.shop-tabs .tab {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.shop-tabs .tab:hover { color: var(--brand); }
.shop-tabs .tab.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
  font-weight: 500;
}
.toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  padding: 8px 16px;
  border-radius: 0 0 8px 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.toolbar-row .left {
  display: flex;
  gap: 12px;
  align-items: center;
}
.range-pill {
  display: inline-flex;
  background: var(--bg);
  border-radius: 18px;
  padding: 2px;
  font-size: 12px;
}
.range-pill a {
  padding: 4px 12px;
  border-radius: 16px;
  color: var(--text-2);
  cursor: pointer;
}
.range-pill a.active { background: var(--brand); color: #fff; }
.range-pill a:hover:not(.active) { color: var(--brand); }

/* ---------- 卡片 ---------- */
.card {
  background: #fff;
  border-radius: 8px;
  border: 1px solid var(--border);
  padding: 16px;
  margin-bottom: 16px;
}
.card-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 4px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-title .desc {
  font-size: 12px;
  color: var(--text-3);
  font-weight: 400;
}
.card-title .right { display: flex; gap: 8px; }
.card-sub {
  font-size: 12px;
  color: var(--text-3);
  margin: 0 0 12px 0;
}
.card .btn-sm {
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  color: var(--text-2);
}
.card .btn-sm:hover { color: var(--brand); border-color: var(--brand); }

/* KPI 卡片网格 */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.kpi-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.kpi-grid.cols-6 { grid-template-columns: repeat(6, 1fr); }
.kpi-card {
  background: #fff;
  border-radius: 8px;
  padding: 16px;
  border: 1px solid var(--border);
  position: relative;
  min-height: 156px;
  height: 156px;
  overflow: hidden;
}
.kpi-card .label { font-size: 13px; color: var(--text-2); margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; }
.kpi-card .label .num { font-size: 12px; color: var(--text-3); }
.kpi-card .value { font-size: 24px; font-weight: 600; color: var(--text); }
.kpi-card .value .unit { font-size: 13px; color: var(--text-3); font-weight: 400; margin-left: 4px; }
.kpi-card .meta { font-size: 12px; color: var(--text-3); margin-top: 6px; display: flex; justify-content: space-between; }
.kpi-card .trend-up   { color: var(--danger); }   /* 涨是红 */
.kpi-card .trend-down { color: var(--success); } /* 跌是绿 */
.kpi-card .kpi-mini-chart {
  display: block !important;
  width: 100% !important;
  height: 42px !important;
  max-height: 42px !important;
  margin-top: 4px;
}
.kpi-card.primary { background: linear-gradient(135deg, #f0f7ff 0%, #e1efff 100%); border: 1px solid #b9d6ff; }

/* 表格 */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.table th, .table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.table th {
  background: var(--gray-bg);
  font-weight: 500;
  color: var(--text-2);
}
.table tbody tr:hover { background: var(--brand-soft); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }

/* 徽章 */
.tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 4px;
  font-size: 12px;
  background: var(--brand-light);
  color: var(--brand);
}
.tag-green { background: #e8ffea; color: var(--success); }
.tag-orange { background: #fff3e0; color: var(--warning); }
.tag-red { background: #ffece8; color: var(--danger); }
.tag-gray { background: var(--bg-2); color: var(--text-2); }
.tag-blue { background: #e6f4ff; color: #1677ff; }
.tag-purple { background: #f2eaff; color: #722ed1; }

/* 平台色标 —— 各平台取品牌主色 */
.tag-plat {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 11px;
  line-height: 17px;
  font-weight: 500;
  white-space: nowrap;
  border: 1px solid transparent;
}
.tag-plat-douyin   { background: #161823; color: #fff; }              /* 抖音 黑 */
.tag-plat-taobao   { background: #fff0e6; color: #ff5000; border-color: #ffd0b0; } /* 淘宝 橙 */
.tag-plat-jd       { background: #ffeceb; color: #e1251b; border-color: #ffc9c6; } /* 京东 红 */
.tag-plat-pdd      { background: #ffe9ef; color: #e02e24; border-color: #ffc2ce; } /* 拼多多 红 */
.tag-plat-tiktok   {                                                   /* TikTok 品牌渐变 */
  background: linear-gradient(90deg, #25f4ee 0%, #000 55%, #fe2c55 100%);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .55);
  font-weight: 600;
}
.tag-plat-kuaishou { background: #fff0e0; color: #ff6600; border-color: #ffd4ab; }
.tag-plat-shipinhao{ background: #e8f5e9; color: #07c160; border-color: #b7e6c6; }
/* 海外及跨境平台 */
.tag-plat-amazon   { background: #fff3e8; color: #ff9900; border-color: #ffd9a8; }
.tag-plat-shein    { background: #202020; color: #fff; border-color: #202020; }
.tag-plat-temu     { background: #fff1ee; color: #f15a24; border-color: #ffc8bc; }
.tag-plat-aliexpress { background: #fff0ed; color: #e43225; border-color: #ffc9c3; }
.tag-plat-ebay     { background: #eef5ff; color: #3665f3; border-color: #c5d8ff; }
.tag-plat-walmart  { background: #edf6ff; color: #0071ce; border-color: #bedcff; }
.tag-plat-etsy     { background: #fff1e8; color: #f1641e; border-color: #ffc9aa; }
.tag-plat-shopee   { background: #fff0eb; color: #ee4d2d; border-color: #ffc7bb; }
.tag-plat-lazada   { background: #f3efff; color: #6b32c9; border-color: #d8c9ff; }
.tag-plat-mercado  { background: #fffbe7; color: #3483fa; border-color: #f7d86e; }
.tag-plat-coupang  { background: #fff0f2; color: #e52528; border-color: #ffc8cf; }
.tag-plat-shopify  { background: #edf8ed; color: #4a9c4a; border-color: #bfe1bf; }
.tag-plat-shopline { background: #edfaff; color: #0c8ed9; border-color: #bde7fa; }
.tag-plat-default  { background: var(--bg-2); color: var(--text-2); }

/* 通用弹窗（店铺增删改复用） */
.modal-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0, 0, 0, .45);
  display: flex; align-items: center; justify-content: center;
}
.modal-box {
  background: #fff; width: 420px; max-width: 92vw; border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .25); overflow: hidden;
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--border);
  font-weight: 600; font-size: 15px;
}
.modal-x {
  border: none; background: transparent; font-size: 22px; line-height: 1;
  cursor: pointer; color: var(--text-3);
}
.modal-body { padding: 18px; }
.modal-body .field { margin-bottom: 12px; }
.modal-body .field label { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 4px; }
.modal-body .field input, .modal-body .field select {
  width: 100%; padding: 8px 10px; border: 1px solid var(--border);
  border-radius: 6px; font-size: 14px; box-sizing: border-box;
}

/* 系统品牌设置 */
.brand-preview {
  display: flex; align-items: center; gap: 9px; flex-shrink: 0;
  padding: 9px 12px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 8px;
}
.brand-preview-dot, .brand-preview-avatar {
  width: 30px; height: 30px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand); color: #fff; font-size: 14px; font-weight: 700; overflow: hidden;
}
.brand-preview > div { display: flex; flex-direction: column; min-width: 120px; }
.brand-preview strong { font-size: 13px; color: var(--text-1); }
.brand-preview small { color: var(--text-3); font-size: 10px; white-space: nowrap; }
.brand-preview-avatar { border-radius: 50%; background: #5b8ff9; margin-left: 2px; }

/* 健康中心条目 */
.health-item {
  display: flex;
  align-items: center;
  padding: 12px 8px;
  border-bottom: 1px dashed var(--border);
  font-size: 14px;
}
.health-item:last-child { border-bottom: none; }
.health-item .ico-dot {
  width: 8px; height: 8px; border-radius: 50%;
  margin-right: 10px;
}
.health-item .ico-dot.b { background: var(--brand); }
.health-item .ico-dot.o { background: var(--warning); }
.health-item .ico-dot.g { background: var(--success); }
.health-item .ico-dot.r { background: var(--danger); }
.health-item .name { flex: 1; }
.health-item .name .sub { font-size: 12px; color: var(--text-3); display: block; margin-top: 2px; }
.health-item .num { font-size: 18px; font-weight: 600; margin-right: 14px; }
.health-item .act {
  font-size: 12px;
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  color: var(--text-2);
  background: #fff;
}
.health-item .act:hover { color: var(--brand); border-color: var(--brand); }

/* 周期成绩单 */
.period-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.period-grid .item {
  padding: 6px 16px;
  border-right: 1px solid var(--border);
}
.period-grid .item:last-child { border-right: none; }
.period-grid .item .label { font-size: 12px; color: var(--text-3); }
.period-grid .item .value { font-size: 18px; font-weight: 600; margin-top: 4px; }
.period-grid .item .meta  { font-size: 11px; color: var(--text-3); margin-top: 2px; }

/* 经营结构条 */
.struct-bar {
  height: 10px;
  background: var(--bg-2);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  margin-top: 8px;
}
.struct-bar .b { height: 100%; }
.struct-bar .b.k1 { background: linear-gradient(to right, #5ba8ff, #1677ff); }
.struct-bar .b.k2 { background: linear-gradient(to right, #6dd9b8, #00b894); }
.struct-bar .b.k0 { background: linear-gradient(to right, #ffbf6d, #ff7d00); }

/* 进度条 */
.progress {
  height: 6px;
  background: var(--bg-2);
  border-radius: 3px;
  overflow: hidden;
}
.progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(to right, #5ba8ff, #1677ff);
}
.progress.warn > span { background: linear-gradient(to right, #ffbf6d, #ff7d00); }
.progress.danger > span { background: linear-gradient(to right, #ff7a7a, #f53f3f); }

/* 按钮 */
.btn {
  border: none;
  background: var(--brand);
  color: #fff;
  padding: 6px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
}
.btn:hover { background: #0f6dd9; }
.btn.gray { background: #fff; color: var(--text-2); border: 1px solid var(--border); }
.btn.gray:hover { color: var(--brand); border-color: var(--brand); }
.btn.danger { background: var(--danger); }
.btn-sm { padding: 3px 10px; font-size: 12px; }

/* 状态点 */
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.dot.green { background: var(--success); }
.dot.red   { background: var(--danger); }
.dot.gray  { background: var(--text-3); }
.dot.blink { animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: 0.3; } }

/* 表单 */
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 4px; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 13px;
  outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--brand);
}

/* footer */
.app-footer {
  margin-top: 32px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-3);
  background: var(--bg);
}

/* 响应式 */
.mobile-menu-btn, .mobile-shop-btn, .mobile-shop-picker { display: none; }
@media (max-width: 1080px) {
  .kpi-grid.cols-6 { grid-template-columns: repeat(3, 1fr); }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .period-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  :root { --sidebar-w: 0; --header-h: 54px; }
  html, body { width: 100%; min-width: 0; overflow-x: hidden; }
  body { font-size: 13px; }
  .app-layout { display: block; min-height: calc(100vh - var(--header-h)); padding-top: 0; }
  .app-header {
    height: var(--header-h); padding: 0 10px; gap: 8px; z-index: 100;
    justify-content: flex-start;
  }
  .app-logo { display: flex; position: static; width: auto; height: 38px; padding: 0; background: transparent; color: var(--text); }
  .app-logo .dot { width: 30px; height: 30px; margin-right: 7px; font-size: 14px; }
  .app-logo .lb { font-size: 14px; line-height: 1.15; }
  .app-logo small { font-size: 9px; color: var(--text-3); letter-spacing: 0; }
  .mobile-menu-btn, .mobile-shop-btn {
    display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
    border: 1px solid var(--border); background: #fff; color: var(--text-2);
    border-radius: 7px; min-width: 34px; height: 34px; padding: 0 8px; cursor: pointer;
  }
  .mobile-menu-btn { font-size: 18px; }
  .mobile-shop-btn { font-size: 12px; margin-left: auto; }
  .header-actions { gap: 5px; margin-left: auto; min-width: 0; }
  .header-actions > .btn-ghost:not(:last-of-type), .header-actions > .bell,
  .header-actions > .btn-primary, .header-actions > .btn:not(:last-of-type) { display: none !important; }
  .header-actions > .btn-ghost[title="当前登录账号"] { display: none !important; }
  .header-actions .user-avatar { width: 28px; height: 28px; margin: 0; }
  .header-actions .btn-ghost[title="退出当前账号"] { display: inline-flex !important; font-size: 0; padding: 0; width: 30px; height: 30px; align-items: center; justify-content: center; }
  .header-actions .btn-ghost[title="退出当前账号"]::after { content: '⏻'; font-size: 15px; }
  .sidebar {
    display: block; position: fixed; top: var(--header-h); left: 0; bottom: 0; width: min(82vw, 300px);
    height: auto; transform: translateX(-105%); transition: transform .2s ease; box-shadow: 8px 0 24px rgba(0,0,0,.12);
    z-index: 90; padding-bottom: 36px;
  }
  body.mobile-nav-open::after { content: ''; position: fixed; inset: var(--header-h) 0 0; background: rgba(15,23,42,.35); z-index: 80; }
  body.mobile-nav-open .sidebar { transform: translateX(0); }
  .main { margin-left: 0; width: 100%; padding: 12px 10px 24px; }
  .motivation-banner { min-height: 108px; height: auto; top: 4px; margin-bottom: 10px; padding: 20px 22px 22px; border-radius: 10px; }
  .motivation-banner::after { left: 22px; bottom: 12px; width: 64px; }
  .motivation-banner__headline { font-size: clamp(21px, 6vw, 30px); letter-spacing: 2px; }
  .motivation-banner__eyebrow { font-size: 9px; letter-spacing: 1.8px; }
  .motivation-banner__subline { font-size: 11px; letter-spacing: 1px; }
  .motivation-banner__side { display: none; }
  .mobile-shop-picker { display: none; background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 9px 10px; margin-bottom: 10px; }
  .mobile-shop-picker.open { display: flex; align-items: center; gap: 8px; }
  .mobile-shop-picker label { color: var(--text-2); font-size: 12px; white-space: nowrap; }
  .mobile-shop-picker select { flex: 1; min-width: 0; border: 1px solid var(--border); border-radius: 6px; padding: 7px 8px; background: #fff; }
  .crumbs { align-items: flex-start; gap: 8px; margin-bottom: 10px; }
  .crumbs h1 { font-size: 17px; }
  .crumbs .route-trail { font-size: 11px; }
  .crumbs > .btn, .crumbs > button { flex: 0 0 auto; white-space: nowrap; padding: 7px 9px; font-size: 12px; }
  .card { padding: 12px; margin-bottom: 10px; border-radius: 7px; overflow: hidden; }
  .card-title { font-size: 14px; }
  .card-sub { font-size: 11px; line-height: 1.45; margin-bottom: 9px; }
  .kpi-grid, .kpi-grid.cols-3, .kpi-grid.cols-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
  .kpi-card { min-height: 96px; height: auto; padding: 11px; }
  .kpi-card .label { font-size: 11px; margin-bottom: 5px; }
  .kpi-card .value { font-size: 20px; }
  .kpi-card .meta { font-size: 10px; margin-top: 4px; }
  .toolbar-row, .shop-tabs { padding: 7px 8px; gap: 7px; align-items: stretch; flex-wrap: wrap; }
  .toolbar-row { margin-bottom: 10px; }
  .toolbar-row .left { flex-wrap: wrap; gap: 6px; width: 100%; }
  .range-pill { max-width: 100%; overflow-x: auto; }
  .range-pill a { padding: 5px 9px; white-space: nowrap; }
  .table-wrap, .table-scroll, .card:has(> .table), .card:has(> div > .table) { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table { min-width: 640px; font-size: 12px; }
  .table th, .table td { padding: 8px 9px; white-space: nowrap; }
  .table td[style*="white-space:normal"] { white-space: normal; min-width: 150px; }
  .table button, .btn-sm { min-height: 30px; padding: 5px 8px; }
  .period-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .period-grid .item { padding: 6px 9px; }
  .tabs-row { overflow-x: auto; margin-bottom: 10px; }
  .tabs-row .tab { padding: 8px 12px; white-space: nowrap; }
  .modal { width: calc(100vw - 20px) !important; max-width: none; max-height: 90vh; padding: 14px; border-radius: 10px; }
  .modal-box { width: calc(100vw - 20px) !important; max-width: none; max-height: 90vh; overflow-y: auto; }
  .modal-body { padding: 13px; }
  .modal-body .field input, .modal-body .field select, .modal-body .field textarea,
  .field input, .field select, .field textarea { font-size: 16px; min-height: 40px; }
  .modal [style*="grid-template-columns"], .modal-body [style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
  .modal [style*="justify-content:flex-end"], .modal-body [style*="justify-content:flex-end"] { flex-wrap: wrap; }
  .modal [style*="justify-content:flex-end"] .btn, .modal-body [style*="justify-content:flex-end"] .btn { flex: 1; min-width: 100px; }
  .chart-box { min-height: 210px; overflow: hidden; }
  .notice { align-items: flex-start; font-size: 12px; padding: 8px 10px; }
  .app-footer { margin-top: 18px; padding: 12px 0; font-size: 10px; }
  .toast { top: 64px; left: 10px; right: 10px; text-align: center; padding: 9px 12px; }
}
@media (max-width: 390px) {
  .app-logo .lb { display: none; }
  .main { padding-left: 8px; padding-right: 8px; }
  .kpi-card { padding: 9px; }
  .kpi-card .value { font-size: 18px; }
  .crumbs h1 { font-size: 16px; }
}

/* 模态框 */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #fff;
  border-radius: 8px;
  width: 520px;
  max-width: 92vw;
  max-height: 86vh;
  overflow: auto;
  padding: 20px;
}
.modal h3 { margin: 0 0 12px; font-size: 16px; }

/* 标签切换 */
.tabs-row {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
  gap: 4px;
}
.tabs-row .tab {
  padding: 8px 18px;
  cursor: pointer;
  font-size: 14px;
  border-bottom: 2px solid transparent;
  color: var(--text-2);
}
.tabs-row .tab.active { color: var(--brand); border-bottom-color: var(--brand); }

/* 图表容器 */
.chart-box {
  width: 100%;
  position: relative;
}
.chart-box canvas, .chart-box > div {
  width: 100% !important;
}

/* 警告/通知条 */
.notice {
  background: #fff7e6;
  border: 1px solid #ffd591;
  color: #874d00;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.notice .close { margin-left: auto; cursor: pointer; }

/* 直播间主数据卡片样式 */
.shot-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px dashed var(--border);
}
.shot-card:last-child { border-bottom: none; }
.shot-card .label { color: var(--text-2); font-size: 13px; }
.shot-card .val { font-size: 16px; font-weight: 600; }

/* 顶部店铺切换 chip 组（行 1） */
.shop-chips {
  display: flex;
  overflow-x: auto;
  background: #fff;
  border-radius: 8px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  margin-bottom: 0;
}
.shop-chips .chip {
  padding: 6px 12px;
  font-size: 13px;
  color: var(--text-2);
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  margin-right: 4px;
  border: 1px solid transparent;
}
.shop-chips .chip.active {
  background: var(--brand-light);
  color: var(--brand);
  border-color: #91caff;
}

/* toast */
.toast {
  position: fixed;
  top: 80px;
  right: 24px;
  padding: 10px 18px;
  border-radius: 6px;
  z-index: 100;
  font-size: 13px;
  color: #fff;
  display: none;
}
.toast.success { background: var(--success); display: block; }
.toast.error { background: var(--danger); display: block; }
.toast.info  { background: var(--brand); display: block; }

/* 排班甘特 */
.gantt {
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: auto;
  max-height: 480px;
}
.gantt table { width: 100%; border-collapse: collapse; font-size: 12px; }
.gantt th, .gantt td {
  border: 1px solid var(--border);
  padding: 6px 8px;
  white-space: nowrap;
}
.gantt th { background: var(--gray-bg); position: sticky; top: 0; z-index: 2; }
.gantt .cell {
  text-align: center;
  color: var(--text-3);
}
.gantt .cell.has-shift { background: var(--brand-light); color: var(--brand); }
.gantt .cell.has-shift.k2 { background: #d9f7e9; color: var(--success); }
.gantt .cell.has-shift.k3 { background: #fff0d6; color: var(--warning); }
.gantt .cell.has-shift.k4 { background: #ffe8e6; color: var(--danger); }
.gantt .cell.has-shift.k5 { background: #ece9fd; color: #722ed1; }

/* 文件上传 */
.uploader {
  border: 2px dashed var(--border);
  border-radius: 8px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
}
.uploader:hover { border-color: var(--brand); background: var(--brand-soft); }
.uploader input[type="file"] { display: none; }
.uploader .ico { font-size: 32px; color: var(--brand); }

/* 登录页 */
.login-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #eaf2ff 0%, #f6f8fb 100%);
}
.login-card {
  width: 380px; background: #fff; border-radius: 12px; padding: 32px 28px;
  box-shadow: 0 12px 40px rgba(0,0,0,.10);
}
.login-logo { display: flex; justify-content: center; margin-bottom: 12px; }
.login-logo .dot {
  width: 44px; height: 44px; border-radius: 10px; background: var(--brand); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700;
}
.login-title { text-align: center; font-size: 20px; margin: 8px 0 4px; }
.login-sub { text-align: center; font-size: 12px; color: var(--text-3); margin: 0 0 20px; }
.login-submit { width: 100%; margin-top: 12px; padding: 10px; font-size: 15px; }
.login-err { color: var(--danger); font-size: 12px; min-height: 16px; }
.login-hint {
  margin-top: 16px; padding: 10px; background: var(--bg-2); border-radius: 6px;
  font-size: 11px; color: var(--text-2); text-align: center; line-height: 1.6;
}
.login-link {
  display: block; width: 100%; margin-top: 10px; border: none; background: none;
  color: var(--brand); font-size: 12px; cursor: pointer; text-align: center;
}
.login-apply { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border); }
.login-msg { font-size: 12px; color: var(--text-2); margin-top: 8px; }
.login-msg.ok { color: var(--success); }

/* 移动端最终覆盖：放在所有基础组件之后，避免被后续基础样式覆盖 */
@media (max-width: 720px) {
  .modal { width: calc(100vw - 20px) !important; max-width: none !important; max-height: 90vh !important; padding: 14px !important; }
  .modal-body { padding: 13px !important; }
  .modal-overlay { padding: 10px; }
  .modal-overlay .modal-box { width: calc(100vw - 20px) !important; max-width: none !important; max-height: 90vh; }
  .modal-overlay .modal-body { padding: 13px; }
  .modal-overlay .modal-body form { min-width: 0; }
  .modal-overlay .modal-body [style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
  .modal-overlay .modal-body [style*="justify-content:flex-end"] { flex-wrap: wrap; }
  .modal-overlay .modal-body [style*="justify-content:flex-end"] .btn { flex: 1 1 120px; min-height: 38px; }
  .uploader { padding: 18px 12px; }
  .login-card { width: calc(100vw - 28px); padding: 24px 18px; }
}
