.home-shell {
  display: flex;
  min-height: 100vh;
  background: #f8fafc;
  color: #0f172a;
}

/*
 * Sparkols 壳（#main-container.home-shell）：main.css 中 body 为 height:100vh + overflow:hidden，
 * 必须由右侧 .home-content 承担纵向滚动，否则邮件等长页「划不动」。
 */
#main-container.home-shell {
  height: 100vh;
  max-height: 100vh;
  min-height: 0;
  overflow: hidden;
}
#main-container.home-shell > .home-content {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  /* 顶栏与各业务页同一最大宽度、水平对齐，避免整列通栏拉满 */
  display: flex;
  flex-direction: column;
  align-items: center;
}
#main-container.home-shell > .home-content > * {
  width: 100%;
  max-width: 1080px;
  box-sizing: border-box;
}
#main-container.home-shell > .home-content > .sparkols-page.sparkols-page-fullwidth {
  max-width: none;
  align-self: stretch;
}
#main-container.home-shell > .home-content > #page-projects {
  max-width: min(1500px, 100%);
}

body.sparkols-shell-inbox-route #main-container.home-shell > .home-content {
  align-items: stretch;
  padding: 0;
}
body.sparkols-shell-inbox-route #main-container.home-shell > .home-content > * {
  max-width: none;
}
body.sparkols-shell-inbox-route .home-topbar {
  display: none;
}
body.sparkols-shell-inbox-route .home-h1 {
  font-size: 18px;
}
body.sparkols-shell-inbox-route .home-hint {
  font-size: 12px;
}

.sparkols-mail-inbox-embed-page {
  flex: 1 1 auto;
  min-height: 0;
}
.sparkols-mail-inbox-embed-wrap {
  position: relative;
  height: 100vh;
  min-height: 0;
  border: 1px solid #dbe5f0;
  border-radius: 0;
  overflow: hidden;
  background: #f8fafc;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.16);
}
.sparkols-mail-inbox-frame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #f8fafc;
}
.sparkols-mail-inbox-frame-error {
  position: absolute;
  inset: 12px;
  z-index: 2;
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 8px;
  padding: 16px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fff7f7;
  color: #7f1d1d;
  font-size: 13px;
  line-height: 1.55;
}
.sparkols-mail-inbox-frame-error[hidden] {
  display: none !important;
}
.sparkols-mail-inbox-frame-error button {
  height: 30px;
  padding: 0 12px;
  border: 1px solid #fca5a5;
  border-radius: 4px;
  background: #fff;
  color: #991b1b;
  cursor: pointer;
}

/* 侧栏「分发设置」：隐藏邮件页顶部模版/SMTP 等，只保留分发卡片与筛选弹层 */
body.sparkols-mail-dispatch-only #page-mail .sparkols-mail-page-extra {
  display: none !important;
}

/* 分发设置独立页：仅隐藏「筛选条件」原始 JSON（仍可用「可视化筛选」）；模板变量映射必须保留，与任务页发信逻辑一致 */
body.sparkols-mail-dispatch-only #mail-auto-dispatch-bd-panel #mad-filter-json {
  display: none !important;
}
body.sparkols-mail-dispatch-only #mail-auto-dispatch-bd-panel .sparkols-mad-filter-hint-dispatch {
  display: block !important;
}

/* 邮件页：隐藏分发设置（避免与左侧「分发设置」重复） */
body:not(.sparkols-mail-dispatch-only) #mail-auto-dispatch-bd-panel {
  display: none !important;
}

/* 邮件页：不展示「执行情况」（仅分发设置页展示） */
body:not(.sparkols-mail-dispatch-only) #mail-dispatch-status-details,
body:not(.sparkols-mail-dispatch-only) #mail-dispatch-status-panel {
  display: none !important;
}

/* Sparkols 左侧导航 · 紧凑后台导航 */
.home-sidebar {
  width: 220px;
  background: #1e2229;
  color: rgba(255, 255, 255, 0.88);
  padding: 14px 10px;
  box-sizing: border-box;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.home-brand-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.home-sidebar-collapse-btn {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.82);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}
.home-sidebar-collapse-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.home-sidebar-restore-btn {
  display: none;
  position: fixed;
  left: 12px;
  top: 12px;
  z-index: 40;
  height: 34px;
  padding: 0 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.14);
  cursor: pointer;
  font-weight: 700;
}

body.sparkols-main-sidebar-collapsed .home-sidebar {
  display: none;
}
body.sparkols-main-sidebar-collapsed .home-sidebar-restore-btn {
  display: inline-flex;
  align-items: center;
}
body.sparkols-main-sidebar-collapsed #main-container.home-shell > .home-content {
  padding-left: 56px;
}

.home-brand {
  padding: 8px 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 10px;
}
.home-brand-title {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.02em;
  color: #fff;
}
.home-brand-sub {
  margin-top: 4px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.35;
}

.home-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 2px;
}
.home-nav::-webkit-scrollbar {
  width: 6px;
}
.home-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 3px;
}
.home-nav::-webkit-scrollbar-track {
  background: transparent;
}
.home-sidebar-footer {
  flex-shrink: 0;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.home-sidebar-footer-link {
  border-radius: 6px;
}
.home-nav-group-title {
  margin: 12px 10px 6px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.38);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* 顶栏单项（概览、用户统计等） */
.home-nav > .home-nav-item:not(.home-nav-mail-toggle):not(.home-nav-sub-item) {
  display: block;
  box-sizing: border-box;
  text-decoration: none;
  text-align: left;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.home-nav > a.home-nav-item:not(.home-nav-sub-item):hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}
.home-nav > a.home-nav-item:not(.home-nav-sub-item).active {
  background: rgba(255, 255, 255, 0.075);
  color: rgba(255, 255, 255, 0.96);
  box-shadow: none;
}

/* 折叠分组 */
.home-nav-mail-group {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-bottom: 4px;
}

.home-nav-mail-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: inherit;
  width: 100%;
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(255, 255, 255, 0.84);
  border-radius: 6px;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 500;
  text-align: left;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.home-nav-mail-toggle:hover {
  background: rgba(255, 255, 255, 0.055);
  color: #fff;
}
.home-nav-mail-toggle[aria-expanded='true'] {
  background: rgba(255, 255, 255, 0.035);
  color: rgba(255, 255, 255, 0.9);
}
/* 当前路由落在该分组内时（由 sparkols_app.js 打 active），略提亮父行，类似云控制台选中分区 */
.home-nav-mail-toggle.active {
  border-color: transparent;
  background: rgba(255, 255, 255, 0.065);
  color: rgba(255, 255, 255, 0.96);
}
.home-nav-mail-toggle.active:hover {
  border-color: transparent;
  background: rgba(255, 255, 255, 0.085);
}
.home-nav-toggle-label {
  flex: 1;
  min-width: 0;
}

.home-nav-mail-chevron {
  display: inline-block;
  flex-shrink: 0;
  width: 14px;
  text-align: center;
  opacity: 0.5;
  font-size: 9px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.65);
  transition: transform 0.18s ease, opacity 0.12s;
}
/* 展开：箭头朝上（与腾讯云侧栏一致） */
.home-nav-mail-toggle[aria-expanded='true'] .home-nav-mail-chevron {
  transform: rotate(180deg);
  opacity: 0.75;
}
.home-nav-mail-toggle.active .home-nav-mail-chevron {
  opacity: 0.85;
}

/* 子菜单：无树线，轻缩进 */
.home-nav-mail-sub {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin: 2px 0 6px 0;
  padding: 2px 0 2px 8px;
  border-left: 0;
}

.home-nav-sub-item {
  display: block;
  box-sizing: border-box;
  width: 100%;
  padding: 6px 9px !important;
  margin: 0 !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  line-height: 1.35 !important;
  border: none !important;
  border-radius: 4px !important;
  background: transparent !important;
  color: rgba(255, 255, 255, 0.68) !important;
  text-decoration: none !important;
  text-align: left !important;
  cursor: pointer !important;
  transition: background 0.12s, color 0.12s, box-shadow 0.12s !important;
}
.home-nav-sub-item:hover {
  background: rgba(255, 255, 255, 0.06) !important;
  color: rgba(255, 255, 255, 0.92) !important;
}
.home-nav-sub-item.active {
  background: rgba(255, 255, 255, 0.075) !important;
  color: rgba(255, 255, 255, 0.96) !important;
  box-shadow: none !important;
  border-left-color: transparent !important;
  outline: none !important;
}

/* 侧栏底「搜索任务设置」 */
.home-sidebar-footer .home-nav-item {
  display: block;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  color: rgba(255, 255, 255, 0.75);
  border-radius: 6px;
  font-size: 12px;
}
.home-sidebar-footer .home-nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.home-content {
  flex: 1;
  padding: 16px 20px;
  box-sizing: border-box;
  min-width: 0;
  background: #f5f6f8;
}

.home-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.home-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #475569;
  flex-shrink: 0;
}

.home-btn-logout {
  padding: 4px 12px;
  border-radius: 3px;
  border: 1px solid #dcdcdc;
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  color: #333;
  font-weight: 400;
}
.home-btn-logout:hover {
  border-color: #bfbfbf;
  background: #fafafa;
}

.home-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0;
}
.home-h1 {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
  letter-spacing: -0.01em;
}
.home-hint {
  margin-top: 4px;
  font-size: 12px;
  color: #64748b;
  font-weight: 400;
}

.home-kpi {
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  padding: 10px 12px;
  background: #fff;
}
.home-kpi-label {
  font-size: 12px;
  color: #64748b;
}
.home-kpi-value {
  margin-top: 6px;
  font-size: 20px;
  font-weight: 700;
}

.home-panel {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 14px 16px;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
}

.home-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.home-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  background: #fbfdff;
}
.home-card-k {
  font-size: 12px;
  color: #64748b;
}
.home-card-v {
  margin-top: 6px;
  font-size: 20px;
  font-weight: 700;
}
.sparkols-clickable-card {
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease, transform 0.14s ease;
}
.sparkols-clickable-card:hover {
  border-color: rgba(22, 119, 255, 0.28);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}
.sparkols-clickable-card:focus-visible {
  outline: 2px solid rgba(22, 119, 255, 0.45);
  outline-offset: 2px;
}
.sparkols-flash-target {
  animation: sparkolsFlashTarget 1.8s ease-out;
}
.sparkols-flash-target > td {
  animation: sparkolsFlashTarget 1.8s ease-out;
}
@keyframes sparkolsFlashTarget {
  0% {
    box-shadow: 0 0 0 0 rgba(22, 119, 255, 0.42);
    background-color: rgba(22, 119, 255, 0.14);
  }
  60% {
    box-shadow: 0 0 0 8px rgba(22, 119, 255, 0);
    background-color: rgba(22, 119, 255, 0.08);
  }
  100% {
    box-shadow: none;
  }
}
.home-empty {
  margin-top: 14px;
  font-size: 12px;
  color: #64748b;
  padding: 10px 12px;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
}

@media (max-width: 1100px) {
  .home-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .home-sidebar { width: 200px; }
  .home-content { padding: 16px; }
  .home-cards { grid-template-columns: 1fr; }
}

/* Sparkols 内容区 */
.sparkols-muted {
  font-size: 13px;
  color: #64748b;
}
.sparkols-batch-topublic-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.sparkols-inline-cb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #475569;
  cursor: pointer;
  user-select: none;
}
.sparkols-inline-cb input {
  cursor: pointer;
}

/* 审核页：主题 Tab + 子筛选分行（对齐报价/交付分栏交互） */
.sparkols-reviews-toolbar {
  margin-bottom: 12px;
}
.sparkols-reviews-theme-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}
.sparkols-reviews-theme-tabs .reviews-theme-tab {
  border-radius: 6px;
}
.sparkols-reviews-subfilters {
  margin-bottom: 0;
}

.sparkols-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.sparkols-business-brief-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.sparkols-business-brief-title h2 {
  margin: 0;
  color: #0f172a;
  font-size: 20px;
  font-weight: 800;
}

.sparkols-business-brief-title p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 13px;
}

.sparkols-business-brief-flow {
  flex: 0 0 auto;
  padding: 6px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
}

.sparkols-business-brief-form label,
.sparkols-business-brief-fields label,
.sparkols-business-brief-raw {
  font-size: 12px;
  color: #334155;
  font-weight: 700;
}

.sparkols-business-brief-workflow {
  display: grid;
  gap: 10px;
}

.sparkols-business-brief-raw {
  display: block;
}

.sparkols-business-brief-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 10px;
  align-items: end;
}

.sparkols-business-brief-fields label {
  display: grid;
  gap: 4px;
}

.sparkols-brief-region-picker-field {
  min-width: 0;
}

.sparkols-brief-region-picker {
  min-height: 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  padding: 4px;
  background: #fff;
  border: 1px solid #d6deea;
  border-radius: 6px;
}

.sparkols-brief-region-chip {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border: 1px solid #d6deea;
  border-radius: 5px;
  background: #f8fafc;
  color: #334155;
  cursor: pointer;
  font-size: 11px;
  line-height: 1.2;
  text-align: left;
}

.sparkols-brief-region-chip strong {
  color: #0f172a;
  font-size: 11px;
}

.sparkols-brief-region-chip span {
  color: #64748b;
  font-size: 10px;
  white-space: nowrap;
}

.sparkols-brief-region-chip:hover {
  border-color: #93c5fd;
  background: #eff6ff;
}

.sparkols-brief-region-chip.is-selected {
  border-color: #2563eb;
  background: #e8f1ff;
  color: #1d4ed8;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.12);
}

.sparkols-brief-region-chip.is-selected strong,
.sparkols-brief-region-chip.is-selected span {
  color: #1d4ed8;
}

.sparkols-brief-country-picker-field {
  min-width: 0;
}

.sparkols-brief-country-picker {
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: #fff;
  border: 1px solid #d6deea;
  border-radius: 6px;
}

.sparkols-brief-region-picker {
  flex-wrap: nowrap;
}

.sparkols-brief-country-selected {
  display: flex;
  flex: 0 1 auto;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  max-width: 60%;
}

.sparkols-brief-region-picker .sparkols-brief-country-selected {
  max-width: 66%;
}

.sparkols-brief-country-chip {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.sparkols-brief-country-chip span {
  color: #64748b;
  font-size: 12px;
  line-height: 1;
}

.sparkols-brief-country-input {
  min-width: 86px;
  flex: 1 1 86px;
  height: 26px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #0f172a;
  font-size: 12px;
}

.sparkols-brief-country-input::placeholder {
  color: #94a3b8;
}

.sparkols-business-brief-wide {
  grid-column: span 2;
}

.sparkols-checkbox-line {
  min-height: 34px;
  display: flex !important;
  align-items: center;
  gap: 6px;
}

.sparkols-business-brief-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.sparkols-brief-feedback {
  min-height: 18px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
}

.sparkols-brief-feedback.is-ok {
  color: #047857;
  font-weight: 700;
}

.sparkols-brief-feedback.is-warn {
  color: #b45309;
  font-weight: 700;
}

.sparkols-brief-feedback.is-error {
  color: #b91c1c;
  font-weight: 700;
}

.sparkols-brief-history-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.sparkols-business-brief-history summary {
  cursor: pointer;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

.sparkols-business-brief-history[open] summary {
  margin-bottom: 10px;
}

.sparkols-business-rec-layout {
  display: block;
  min-width: 0;
}

.sparkols-business-rec-scroll-shell {
  display: grid;
  gap: 0;
  min-width: 0;
  max-width: 100%;
}

.sparkols-business-rec-top-scroll {
  position: sticky;
  top: 0;
  z-index: 12;
  height: 16px;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  background: #f8fafc;
  border: 1px solid #dbeafe;
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
}

.sparkols-business-rec-top-scroll-inner {
  height: 1px;
}

.sparkols-table-wrap.sparkols-business-rec-table {
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  border-radius: 0 0 6px 6px;
}

.sparkols-business-rec-filterbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
  margin: 8px 0 10px;
  max-width: 100%;
}

.sparkols-business-rec-panel > .sparkols-toolbar {
  align-items: flex-start;
  max-width: 100%;
}

.sparkols-business-rec-panel > .sparkols-toolbar > div {
  min-width: 0;
}

.sparkols-business-rec-panel > .sparkols-toolbar > .sparkols-toolbar {
  flex: 1 1 620px;
  justify-content: flex-end;
}

.sparkols-business-rec-filterbar label,
.sparkols-range-filter {
  display: grid;
  flex: 1 1 150px;
  min-width: 140px;
  gap: 4px;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.sparkols-business-rec-filterbar .sparkols-range-filter {
  flex-basis: 210px;
}

.sparkols-business-rec-filterbar .sparkols-input {
  width: 100%;
  min-width: 0;
}

.sparkols-range-filter > span {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  min-width: 0;
}

.sparkols-business-rec-filterbar input[type="number"] {
  appearance: textfield;
}

.sparkols-business-rec-filterbar input[type="number"]::-webkit-outer-spin-button,
.sparkols-business-rec-filterbar input[type="number"]::-webkit-inner-spin-button {
  margin: 0;
}

.sparkols-business-rec-filter-hint {
  flex: 1 0 100%;
  font-size: 12px;
  line-height: 1.5;
}

.sparkols-business-rec-filterbar > .sparkols-btn {
  flex: 0 0 auto;
}

.sparkols-business-rec-list {
  width: 100%;
  min-width: 1480px;
  table-layout: fixed;
}

.sparkols-business-rec-list th,
.sparkols-business-rec-list td {
  vertical-align: top;
  line-height: 1.45;
  word-break: normal;
  overflow-wrap: anywhere;
}

.sparkols-business-rec-list th {
  white-space: nowrap;
}

.sparkols-business-rec-col-check {
  width: 3%;
}

.sparkols-business-rec-col-name {
  width: 14%;
}

.sparkols-business-rec-col-platform {
  width: 11%;
}

.sparkols-business-rec-col-region {
  width: 11%;
}

.sparkols-business-rec-col-price {
  width: 7%;
}

.sparkols-business-rec-col-workflow {
  width: 16%;
}

.sparkols-business-rec-col-reason {
  width: 38%;
}

.sparkols-business-action-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  background: #fff;
}

.sparkols-business-action-strip {
  grid-template-columns: auto minmax(240px, 360px) minmax(320px, 1fr);
  align-items: center;
  margin: 8px 0 12px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #f8fbff;
}

.sparkols-business-action-title {
  color: #0f172a;
  font-size: 15px;
  font-weight: 800;
}

.sparkols-business-action-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.sparkols-business-action-metrics div {
  padding: 8px 6px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
  text-align: center;
}

.sparkols-business-action-metrics span {
  display: block;
  color: #0f172a;
  font-size: 18px;
  font-weight: 800;
}

.sparkols-business-action-metrics small {
  color: #64748b;
  font-size: 11px;
}

.sparkols-business-action-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.sparkols-business-action-panel .sparkols-btn {
  min-width: 0;
}

.sparkols-business-action-note {
  padding: 8px 10px;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  background: #eff6ff;
  color: #1e40af;
  font-size: 12px;
  line-height: 1.5;
}

.sparkols-business-action-strip .sparkols-business-action-note,
.sparkols-business-action-strip #brief-rec-flow-hint {
  grid-column: 1 / -1;
  margin: 0;
}

.sparkols-brief-workflow-cell {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.sparkols-brief-workflow-cell label {
  display: grid;
  gap: 3px;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.sparkols-brief-condition-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.sparkols-brief-quality-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.sparkols-brief-match {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  margin-left: 6px;
  padding: 2px 7px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 800;
}

.sparkols-brief-condition {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 7px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  font-size: 11px;
  font-weight: 800;
}

.sparkols-brief-condition.is-ok {
  border-color: #86efac;
  background: #f0fdf4;
  color: #047857;
}

.sparkols-brief-condition.is-warn {
  border-color: #fde68a;
  background: #fffbeb;
  color: #b45309;
}

.sparkols-brief-condition.is-bad {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.sparkols-brief-save-state {
  color: #047857;
  font-size: 11px;
  font-weight: 800;
}

.sparkols-brief-rec-main,
.sparkols-brief-rec-platform,
.sparkols-brief-rec-region,
.sparkols-brief-rec-price,
.sparkols-brief-rec-status,
.sparkols-brief-rec-reason,
.sparkols-brief-rec-actions {
  min-width: 0;
}

.sparkols-brief-rec-main strong,
.sparkols-brief-rec-platform .sparkols-table-link,
.sparkols-brief-rec-status .sparkols-muted {
  display: inline-block;
  max-width: 100%;
  line-break: anywhere;
  overflow-wrap: anywhere;
  word-break: normal;
}

.sparkols-brief-rec-reason {
  display: grid;
  gap: 6px;
  color: #334155;
  font-size: 12px;
  line-height: 1.45;
}

.sparkols-brief-rec-reason-text {
  max-height: 48px;
  overflow: hidden;
}

.sparkols-brief-rec-reason-points {
  display: grid;
  gap: 4px;
}

.sparkols-brief-rec-price {
  display: grid;
  gap: 5px;
  color: #334155;
  font-size: 12px;
}

.sparkols-brief-rec-price strong {
  color: #0f172a;
  font-size: 14px;
}

.sparkols-brief-price-kicker {
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.sparkols-brief-price-line {
  color: #64748b;
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.sparkols-brief-price-markup-label {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.sparkols-brief-price-markup-label .sparkols-input {
  width: 72px;
  height: 28px;
  padding: 3px 6px;
}

.sparkols-brief-rec-actions {
  display: grid;
  gap: 6px;
}

.sparkols-brief-rec-actions .sparkols-input {
  width: 100%;
  min-width: 0;
}

.sparkols-brief-workflow-cell .sparkols-input {
  width: 100%;
  min-width: 0;
}

.sparkols-brief-rec-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

@media (max-width: 1180px) {
  .sparkols-business-brief-fields {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }
  .sparkols-business-rec-layout {
    display: block;
  }
  .sparkols-business-action-strip {
    grid-template-columns: 1fr;
  }
  .sparkols-business-action-buttons {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .sparkols-business-brief-title {
    display: block;
  }
  .sparkols-business-brief-flow {
    margin-top: 8px;
    display: inline-block;
  }
  .sparkols-business-brief-fields {
    grid-template-columns: 1fr;
  }
  .sparkols-business-rec-filterbar label,
  .sparkols-business-rec-filterbar .sparkols-range-filter {
    flex-basis: 100%;
  }
  .sparkols-business-brief-wide {
    grid-column: span 1;
  }
}

.sparkols-form-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px 12px;
  background: #fafafa;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
}
.sparkols-progress-toolbar {
  align-items: center;
  justify-content: flex-start;
}
.sparkols-progress-toolbar .sparkols-input {
  flex: 0 0 auto;
}
.sparkols-progress-search-input {
  width: 260px;
  min-width: 220px;
  max-width: 32vw;
}
.sparkols-exec-filter-btn {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  font-size: 12px;
  cursor: pointer;
  line-height: 1.3;
  white-space: nowrap;
}
.sparkols-exec-filter-btn:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}
.sparkols-exec-filter-btn.is-active {
  border-color: #0ea5e9;
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 600;
}
.sparkols-input {
  padding: 5px 10px;
  border: 1px solid #d9d9d9;
  border-radius: 3px;
  font-size: 12px;
  min-width: 140px;
  background: #fff;
}
.sparkols-input:hover {
  border-color: #bfbfbf;
}
.sparkols-input:focus {
  outline: none;
  border-color: #0052d9;
  box-shadow: 0 0 0 2px rgba(0, 82, 217, 0.08);
}
.sparkols-input-wide {
  min-width: 220px;
  flex: 1;
}
.sparkols-input--select {
  min-width: 120px;
  padding: 4px 8px;
  cursor: pointer;
}
.sparkols-mail-inline-label {
  font-size: 12px;
  color: #475569;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.sparkols-input-wide-min {
  min-width: 180px;
  max-width: 280px;
}
.sparkols-select-action-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.sparkols-btn-danger-soft {
  color: #b91c1c;
  border-color: #fecaca;
  background: #fff;
}
.sparkols-btn-danger-soft:hover {
  color: #991b1b;
  border-color: #fca5a5;
  background: #fff5f5;
}
.sparkols-mail-resource-modal {
  position: fixed;
  inset: 0;
  z-index: 2600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.35);
}
.sparkols-mail-resource-card {
  width: min(1120px, calc(100vw - 48px));
  max-height: min(820px, calc(100vh - 48px));
  overflow: hidden;
  border: 1px solid #dbe6f3;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22);
  display: flex;
  flex-direction: column;
}
.sparkols-mail-resource-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid #e2e8f0;
}
.sparkols-mail-resource-head b {
  display: block;
  color: #0f172a;
  font-size: 18px;
}
.sparkols-mail-resource-head span {
  color: #64748b;
  font-size: 12px;
}
.sparkols-mail-resource-body {
  overflow: auto;
  padding: 16px 20px 20px;
  background: #f8fafc;
}
.sparkols-mail-resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.sparkols-mail-resource-section {
  min-width: 0;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}
.sparkols-mail-resource-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
  font-weight: 700;
}
.sparkols-mail-resource-section-head span {
  color: #64748b;
  font-size: 12px;
  font-weight: 500;
}
.sparkols-mail-resource-list {
  display: flex;
  flex-direction: column;
}
.sparkols-mail-resource-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid #eef2f7;
}
.sparkols-mail-resource-row:last-child {
  border-bottom: 0;
}
.sparkols-mail-resource-name {
  min-width: 0;
  color: #0f172a;
  font-size: 13px;
  font-weight: 700;
  white-space: normal;
  overflow-wrap: anywhere;
}
.sparkols-mail-resource-meta {
  margin-top: 3px;
  color: #64748b;
  font-size: 11px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.sparkols-mail-resource-empty {
  padding: 22px 14px;
  color: #94a3b8;
  font-size: 13px;
}
@media (max-width: 980px) {
  .sparkols-mail-resource-grid {
    grid-template-columns: 1fr;
  }
}

/* Sparkols · AutoMailer 内嵌块（浅蓝分区，贴近云控制台信息框） */
.sparkols-automailer-service-box {
  margin-bottom: 0;
  padding: 12px 14px;
  background: #f3f8ff;
  border: 1px solid #d4e5ff;
  border-radius: 6px;
}
.sparkols-automailer-service-title {
  font-size: 13px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 10px;
}
.sparkols-automailer-group-box {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 10px;
  padding: 10px 12px;
  background: #fafcff;
  border: 1px solid #e8effa;
  border-radius: 6px;
}

.sparkols-details-panel > summary.sparkols-details-summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-weight: 600;
  font-size: 14px;
  color: #1a1a1a;
  list-style: none;
}
.sparkols-details-panel > summary.sparkols-details-summary::-webkit-details-marker {
  display: none;
}
.sparkols-details-summary-hint {
  font-size: 12px;
  font-weight: 400;
}
.sparkols-btn {
  padding: 5px 12px;
  border-radius: 3px;
  border: 1px solid #0052d9;
  background: #0052d9;
  color: #fff;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.35;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.sparkols-btn:hover {
  background: #0046b8;
  border-color: #0046b8;
}
.sparkols-btn-secondary {
  padding: 5px 12px;
  border-radius: 3px;
  border: 1px solid #dcdcdc;
  background: #fff;
  color: #333;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.35;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.sparkols-btn-secondary:hover {
  border-color: #bfbfbf;
  background: #fafafa;
  color: #111;
}
.sparkols-btn-xs {
  padding: 3px 8px;
  margin: 2px 2px 2px 0;
  border-radius: 3px;
  border: 1px solid #e0e0e0;
  background: #fff;
  font-size: 11px;
  cursor: pointer;
}
.sparkols-btn-xs:hover {
  border-color: #bfbfbf;
}
#mail-template-purpose-tabs .sparkols-btn-xs.is-active {
  background: #0f766e;
  border-color: #0f766e;
  color: #fff;
}
.sparkols-btn-warn {
  border-color: #fca5a5;
  color: #b91c1c;
}
.sparkols-btn-primary {
  border-color: #0f766e;
  background: #0f766e;
  color: #fff;
}
.sparkols-btn-primary:hover {
  border-color: #115e59;
  background: #115e59;
}

/* 按钮异步处理中：灰显 + 转圈，防止连点 */
.sparkols-btn.sparkols-btn--busy,
.sparkols-btn-secondary.sparkols-btn--busy,
.home-content .btn.sparkols-btn--busy {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: not-allowed !important;
  pointer-events: none;
  opacity: 0.88;
  box-shadow: none !important;
}
.sparkols-btn.sparkols-btn--busy,
.home-content .btn.btn-primary.sparkols-btn--busy {
  background: #94a3b8 !important;
  border-color: #94a3b8 !important;
  color: #fff !important;
}
.sparkols-btn-secondary.sparkols-btn--busy,
.home-content .btn.btn-secondary.sparkols-btn--busy {
  background: #e2e8f0 !important;
  border-color: #cbd5e1 !important;
  color: #64748b !important;
}
.sparkols-btn-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: sparkols-btn-spin 0.7s linear infinite;
  flex-shrink: 0;
  box-sizing: border-box;
}
.sparkols-btn-secondary.sparkols-btn--busy .sparkols-btn-spinner,
.home-content .btn.btn-secondary.sparkols-btn--busy .sparkols-btn-spinner {
  border-color: rgba(71, 85, 105, 0.25);
  border-top-color: #475569;
}
.sparkols-btn-busy-label {
  white-space: nowrap;
}
@keyframes sparkols-btn-spin {
  to {
    transform: rotate(360deg);
  }
}

.sparkols-table-wrap {
  overflow-x: auto;
}
.sparkols-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.sparkols-table th,
.sparkols-table td {
  border: 1px solid #e2e8f0;
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}
.sparkols-table th {
  background: #f1f5f9;
  font-weight: 600;
  color: #475569;
}
.sparkols-table tbody tr.sparkols-progress-row--attention td {
  background: #fffbeb;
}

.sparkols-table tbody tr.sparkols-progress-row--final td {
  background: #ecfdf5;
}

.sparkols-table tbody tr.sparkols-progress-row--clickable {
  cursor: pointer;
}
.sparkols-table tbody tr.sparkols-progress-row--clickable:hover td {
  background: #f8fafc;
}
.sparkols-table tbody tr.sparkols-progress-row--attention.sparkols-progress-row--clickable:hover td {
  background: #fef3c7;
}
.sparkols-table tbody tr.sparkols-progress-row--final.sparkols-progress-row--clickable:hover td {
  background: #d1fae5;
}

.sparkols-publish-board {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sparkols-publish-summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 10px;
}

.sparkols-publish-summary-card {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
  min-height: 58px;
  box-sizing: border-box;
}

.sparkols-publish-summary-card span {
  display: block;
  color: #64748b;
  font-size: 11px;
  line-height: 1.4;
}

.sparkols-publish-summary-card strong {
  display: block;
  margin-top: 4px;
  color: #0f172a;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 800;
}

.sparkols-publish-summary-card.is-attention {
  border-color: #fbbf24;
  background: #fffbeb;
}

.sparkols-publish-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sparkols-publish-card {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.sparkols-publish-card.is-due {
  border-color: #fbbf24;
  background: #fffdf5;
}

.sparkols-publish-card-head,
.sparkols-publish-card-foot {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.sparkols-publish-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.sparkols-publish-title span {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 10px;
  font-weight: 800;
}

.sparkols-publish-title strong {
  color: #0f172a;
  font-size: 14px;
  line-height: 1.35;
  word-break: break-word;
}

.sparkols-publish-title em,
.sparkols-publish-sub {
  color: #64748b;
  font-size: 11px;
  font-style: normal;
}

.sparkols-publish-sub {
  margin-top: 3px;
}

.sparkols-publish-badges,
.sparkols-publish-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.sparkols-publish-meta-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1.6fr) minmax(150px, 1fr) minmax(120px, 0.8fr);
  gap: 8px;
  margin-top: 10px;
}

.sparkols-publish-meta-grid > div {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
  padding: 8px 10px;
  min-width: 0;
}

.sparkols-publish-meta-grid span,
.sparkols-publish-metric span,
.sparkols-publish-api-note span {
  display: block;
  color: #64748b;
  font-size: 11px;
  line-height: 1.4;
}

.sparkols-publish-meta-grid strong {
  display: block;
  margin-top: 2px;
  color: #0f172a;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 700;
  word-break: break-word;
}

.sparkols-publish-link {
  color: #1d4ed8;
  text-decoration: none;
}

.sparkols-publish-link:hover {
  text-decoration: underline;
}

.sparkols-publish-metric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(96px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.sparkols-publish-metric {
  border: 1px solid #dbeafe;
  border-radius: 6px;
  background: #eff6ff;
  padding: 8px 10px;
}

.sparkols-publish-metric strong {
  display: block;
  margin-top: 3px;
  color: #0f172a;
  font-size: 16px;
  line-height: 1.25;
}

.sparkols-publish-metric.is-empty {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.sparkols-publish-metric.is-empty strong {
  color: #94a3b8;
}

.sparkols-publish-card-foot {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
}

.sparkols-publish-api-note {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 180px;
}

.sparkols-publish-empty {
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  padding: 22px;
  color: #64748b;
  text-align: center;
}

@media (max-width: 1100px) {
  .sparkols-publish-summary-grid {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
  }
  .sparkols-publish-metric-grid {
    grid-template-columns: repeat(3, minmax(96px, 1fr));
  }
}

@media (max-width: 760px) {
  .sparkols-publish-summary-grid,
  .sparkols-publish-meta-grid,
  .sparkols-publish-metric-grid {
    grid-template-columns: 1fr;
  }
  .sparkols-publish-card-head,
  .sparkols-publish-card-foot {
    flex-direction: column;
  }
  .sparkols-publish-actions,
  .sparkols-publish-badges {
    justify-content: flex-start;
  }
}

.sparkols-table tbody tr.sparkols-lead-row {
  cursor: pointer;
}

.sparkols-table tbody tr.sparkols-lead-row:hover td,
.sparkols-table tbody tr.sparkols-lead-row.is-selected td {
  background: #f8fafc;
}

.sparkols-lead-detail-drawer {
  position: fixed;
  z-index: 1300;
  top: 76px;
  bottom: 24px;
  left: 300px;
  width: min(420px, calc(100vw - 48px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
}

.sparkols-lead-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.sparkols-lead-detail-body {
  overflow: auto;
  padding: 14px 16px 18px;
}

.sparkols-lead-detail-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.sparkols-lead-detail-avatar {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.sparkols-lead-detail-name {
  font-size: 18px;
  line-height: 1.25;
  font-weight: 800;
  color: #0f172a;
}

.sparkols-lead-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 12px;
}

.sparkols-lead-detail-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  font-size: 12px;
  font-weight: 600;
}

.sparkols-lead-detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-bottom: 10px;
}

.sparkols-lead-detail-raw {
  margin-top: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.sparkols-lead-detail-raw summary {
  cursor: pointer;
  padding: 10px 12px;
  font-weight: 700;
  color: #475569;
}

.sparkols-lead-detail-raw pre {
  margin: 0;
  padding: 0 12px 12px;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 11px;
  color: #334155;
}

@media (max-width: 900px) {
  .sparkols-lead-detail-drawer {
    left: 16px;
    right: 16px;
    width: auto;
  }
}

.sparkols-lead-loading-bar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  padding: 7px 10px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.sparkols-page-loading-bar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  padding: 7px 10px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.sparkols-lead-loading-bar.is-compact {
  position: sticky;
  left: 0;
  z-index: 2;
  margin-bottom: 8px;
}

.sparkols-lead-loading-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid #ccfbf1;
  border-top-color: #0f766e;
  border-radius: 999px;
  animation: sparkols-btn-spin .8s linear infinite;
}

.sparkols-lead-loading-table td {
  padding: 9px 10px;
}

.sparkols-lead-skeleton-row {
  display: grid;
  grid-template-columns: 18px 100px minmax(160px, 1fr) 130px 70px;
  gap: 14px;
  align-items: center;
  max-width: 760px;
}

.sparkols-lead-skeleton-dot,
.sparkols-lead-skeleton-line {
  display: block;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #eef2f7 0%, #f8fafc 48%, #eef2f7 100%);
  background-size: 220% 100%;
  animation: sparkols-lead-skeleton 1.1s ease-in-out infinite;
}

.sparkols-lead-skeleton-dot {
  width: 14px;
  height: 14px;
  border-radius: 4px;
}

.sparkols-lead-skeleton-line.is-short { width: 90px; }
.sparkols-lead-skeleton-line.is-wide { width: min(100%, 300px); }
.sparkols-lead-skeleton-line.is-mid { width: 120px; }
.sparkols-lead-skeleton-line.is-tiny { width: 58px; }

@keyframes sparkols-lead-skeleton {
  0% { background-position: 160% 0; }
  100% { background-position: -60% 0; }
}

.sparkols-page-skeleton-line,
.sparkols-page-skeleton-pill {
  display: block;
  background: linear-gradient(90deg, #eef2f7 0%, #f8fafc 48%, #eef2f7 100%);
  background-size: 220% 100%;
  animation: sparkols-lead-skeleton 1.1s ease-in-out infinite;
}

.sparkols-page-skeleton-line {
  height: 12px;
  border-radius: 999px;
}

.sparkols-page-skeleton-line.is-title {
  width: min(54%, 180px);
  height: 18px;
}

.sparkols-page-skeleton-line.is-short {
  width: 94px;
}

.sparkols-page-skeleton-line.is-wide {
  width: min(100%, 360px);
}

.sparkols-page-skeleton-line.is-mid {
  width: min(72%, 220px);
}

.sparkols-page-skeleton-pill {
  width: 48px;
  height: 22px;
  border-radius: 999px;
}

.sparkols-btn-final {
  background: #059669;
  color: #fff;
  border-color: #047857;
}
/* BD：审核退回/拒绝后须修改（交付退回、报价重提、提报拒绝）；覆盖 attention 的黄底 */
.sparkols-table tbody tr.sparkols-bd-audit-action td,
.sparkols-table tbody tr.sparkols-progress-row--attention.sparkols-bd-audit-action td {
  background: #fef2f2 !important;
}
.sparkols-table tbody tr.sparkols-bd-audit-action td:first-child {
  box-shadow: inset 4px 0 0 #dc2626;
}
.sparkols-table tbody tr.sparkols-bd-audit-action:hover td {
  background: #fee2e2 !important;
}
.sparkols-bd-alert-inline {
  display: inline-block;
  margin-right: 6px;
  margin-bottom: 2px;
  font-size: 10px;
  font-weight: 700;
  color: #991b1b;
  background: #fecaca;
  border: 1px solid #f87171;
  border-radius: 4px;
  padding: 2px 6px;
  vertical-align: middle;
  line-height: 1.2;
}
.sparkols-td-sm {
  font-size: 11px;
  color: #64748b;
  max-width: 140px;
  overflow-wrap: anywhere;
  word-break: normal;
}
.sparkols-lead-snap-thumb {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 6px;
  vertical-align: middle;
  margin-right: 6px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}
.sparkols-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid #dbe4ef;
  background: #f8fafc;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}
.sparkols-avatar--md {
  width: 38px;
  height: 38px;
  font-size: 14px;
}
.sparkols-avatar--sm {
  width: 30px;
  height: 30px;
  font-size: 12px;
}
.sparkols-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.sparkols-avatar--tt {
  background: #0f172a;
  color: #ffffff;
}
.sparkols-avatar--yt {
  background: #fee2e2;
  color: #991b1b;
}
.sparkols-avatar--ig {
  background: #fce7f3;
  color: #9d174d;
}
.sparkols-avatar--x {
  background: #e2e8f0;
  color: #0f172a;
}
.sparkols-person-cell {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.sparkols-person-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.sparkols-person-main strong,
.sparkols-person-main span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sparkols-person-main strong {
  color: #0f172a;
  font-size: 12px;
}
.sparkols-person-main span {
  color: #64748b;
  font-size: 11px;
}

/* 待处理页：审核员可见的催促记录表 */
.sparkols-inbox-audit {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}
.sparkols-inbox-audit-title {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}
.sparkols-inbox-audit-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.sparkols-inbox-audit-table {
  min-width: 920px;
  font-size: 11px;
}

.sparkols-urge-audit-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 14px;
  margin-bottom: 14px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}
.sparkols-urge-audit-field {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #475569;
}
.sparkols-urge-audit-field--grow {
  flex: 1 1 200px;
  min-width: 180px;
}
.sparkols-urge-audit-select {
  min-width: 120px;
  font-size: 12px;
}
.sparkols-urge-audit-search {
  width: 100%;
  max-width: 420px;
  font-size: 12px;
}
.sparkols-urge-group-title {
  margin: 16px 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  padding-bottom: 4px;
  border-bottom: 1px solid #e2e8f0;
}
.sparkols-urge-group-title:first-child {
  margin-top: 0;
}

/* 时间链：左侧竖线 + 节点 */
.sparkols-urge-timeline {
  position: relative;
  margin-left: 8px;
  padding-left: 18px;
  border-left: 3px solid #e2e8f0;
}
.sparkols-urge-tl-item {
  position: relative;
  margin-bottom: 16px;
}
.sparkols-urge-tl-item:last-child {
  margin-bottom: 0;
}
.sparkols-urge-tl-item::before {
  content: '';
  position: absolute;
  left: -24px;
  top: 14px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #0ea5e9;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #bae6fd;
  z-index: 1;
}
.sparkols-urge-tl-card {
  min-width: 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}
.sparkols-urge-tl-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin-bottom: 6px;
}
.sparkols-urge-tl-time {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
  margin-right: 4px;
}
.sparkols-urge-chip {
  display: inline-block;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sparkols-urge-chip--bd {
  background: #e0f2fe;
  color: #0369a1;
}
.sparkols-urge-chip--proj {
  background: #ecfdf5;
  color: #047857;
  max-width: 240px;
}
.sparkols-urge-chip--pending {
  background: #fef3c7;
  color: #b45309;
}
.sparkols-urge-chip--done {
  background: #dcfce7;
  color: #15803d;
}
.sparkols-urge-tl-sub {
  font-size: 11px;
  color: #64748b;
  margin-bottom: 8px;
}
.sparkols-urge-tl-msg,
.sparkols-urge-tl-reply {
  font-size: 12px;
  line-height: 1.5;
  color: #334155;
  margin-top: 6px;
  word-break: break-word;
}
.sparkols-urge-tl-reply {
  padding: 8px;
  background: #f8fafc;
  border-radius: 8px;
  border-left: 3px solid #0ea5e9;
}
.sparkols-urge-tl-foot {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 8px;
}
.inbox-urge-audit-mount {
  min-height: 8px;
}
/* 时间列：禁止竖排单字换行 */
.sparkols-td-time {
  font-size: 11px;
  color: #64748b;
  white-space: nowrap;
  max-width: none;
}
.sparkols-table.sparkols-table--wide {
  min-width: 2000px;
  width: max-content;
}
.sparkols-table.sparkols-influencer-pool-table {
  min-width: 1500px;
}
.sparkols-influencer-pool-table .sparkols-inf-agent-cell {
  min-width: 360px;
  max-width: 520px;
  white-space: normal;
  vertical-align: top;
}
.sparkols-inf-agent-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.sparkols-inf-rating {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0;
}
.sparkols-inf-rating--s {
  background: #7c3aed;
}
.sparkols-inf-rating--a {
  background: #0f766e;
}
.sparkols-inf-rating--b {
  background: #2563eb;
}
.sparkols-inf-rating--c {
  background: #d97706;
}
.sparkols-inf-rating--d {
  background: #dc2626;
}
.sparkols-inf-agent-status {
  color: #64748b;
  font-size: 12px;
}
.sparkols-inf-agent-projects {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  color: #475569;
  font-size: 12px;
}
.sparkols-inf-project-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  border-radius: 999px;
  padding: 2px 8px;
  font-weight: 700;
}
.sparkols-inf-agent-summary,
.sparkols-inf-agent-risk {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
  line-height: 1.45;
}
.sparkols-inf-agent-risk {
  margin-top: 4px;
  color: #b91c1c;
}
.sparkols-inf-agent-actions {
  margin-top: 8px;
}
.sparkols-table.sparkols-progress-compact-table {
  min-width: 1550px;
  width: 100%;
  table-layout: fixed;
}
.sparkols-progress-compact-table .sparkols-progress-col-review {
  width: 118px;
}
.sparkols-progress-compact-table .sparkols-progress-col-inf {
  width: 250px;
}
.sparkols-progress-compact-table .sparkols-progress-col-supervision {
  width: 190px;
}
.sparkols-progress-compact-table .sparkols-progress-col-project {
  width: 260px;
}
.sparkols-progress-compact-table .sparkols-progress-col-feedback,
.sparkols-progress-compact-table .sparkols-progress-col-exec {
  width: 190px;
}
.sparkols-progress-compact-table .sparkols-progress-col-flow {
  width: 240px;
}
.sparkols-progress-compact-table .sparkols-progress-col-age {
  width: 140px;
}
.sparkols-progress-compact-table th,
.sparkols-progress-compact-table td {
  overflow-wrap: break-word;
  word-break: normal;
}
.sparkols-progress-compact-table .sparkols-inf-select {
  width: 100%;
  min-width: 0;
}
.sparkols-td-progress-inf {
  min-width: 0;
}
.sparkols-progress-project-cell,
.sparkols-progress-bd-cell {
  display: grid;
  gap: 5px;
  min-width: 0;
}
.sparkols-progress-inf-cell {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.sparkols-progress-avatar-row {
  display: flex;
  align-items: center;
  min-height: 30px;
}
.sparkols-progress-avatar-row .sparkols-avatar {
  width: 30px;
  height: 30px;
  font-size: 12px;
}
.sparkols-progress-inf-text {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.sparkols-progress-inf-alert {
  min-width: 0;
}
.sparkols-progress-inf-main {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.sparkols-progress-inf-main .sparkols-pf {
  flex: 0 0 auto;
}
.sparkols-progress-inf-main strong {
  flex: 1 1 auto;
  min-width: 0;
  color: #0f172a;
  font-size: 12px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sparkols-progress-project-cell strong,
.sparkols-progress-bd-cell strong {
  min-width: 0;
  color: #0f172a;
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: break-word;
  word-break: normal;
}
.sparkols-progress-project-cell .sparkols-progress-timeline-alerts.is-project-cell {
  margin: 0 0 2px;
  gap: 4px;
}
.sparkols-progress-project-cell .sparkols-timeline-alert {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: left;
}
.sparkols-progress-inf-sub,
.sparkols-progress-project-meta {
  color: #64748b;
  font-size: 11px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.sparkols-progress-note-entry-cell,
.sparkols-progress-review-entry-cell {
  vertical-align: top;
}
.sparkols-progress-note-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}
button.sparkols-progress-note-chip {
  cursor: pointer;
  font-family: inherit;
}
button.sparkols-progress-note-chip:hover {
  border-color: #60a5fa;
  background: #dbeafe;
}
.sparkols-progress-note-chip.is-empty {
  border-style: dashed;
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #64748b;
}
.sparkols-progress-opinions {
  display: grid;
  gap: 4px;
  margin-top: 6px;
}
.sparkols-progress-opinion {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  min-width: 0;
  font-size: 11px;
  line-height: 1.45;
}
.sparkols-progress-opinion span {
  flex: 0 0 auto;
  padding: 0 4px;
  border-radius: 4px;
  font-weight: 700;
}
.sparkols-progress-opinion em {
  min-width: 0;
  max-height: 32px;
  overflow: hidden;
  color: #334155;
  font-style: normal;
  overflow-wrap: anywhere;
}
.sparkols-progress-opinion.is-admin span {
  color: #1d4ed8;
  background: #eff6ff;
}
.sparkols-progress-opinion.is-customer span {
  color: #047857;
  background: #ecfdf5;
}
.sparkols-progress-bd-cell .sparkols-progress-urge-cell {
  margin-top: 2px;
}
.sparkols-lead-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #fff;
}
.sparkols-lead-pager .sparkols-input {
  min-width: 76px;
  height: 30px;
  padding: 4px 8px;
  font-size: 12px;
}
.sparkols-mail-template-table,
.sparkols-mail-template-group-table {
  table-layout: fixed;
}
.sparkols-mail-template-table th,
.sparkols-mail-template-table td,
.sparkols-mail-template-group-table th,
.sparkols-mail-template-group-table td {
  overflow-wrap: anywhere;
}
.sparkols-mail-template-preview {
  max-width: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sparkols-mail-template-actions {
  white-space: nowrap;
}
.sparkols-mail-template-config-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}
.sparkols-mail-template-area-card {
  padding: 16px;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.sparkols-mail-template-area-card--main {
  min-height: 360px;
}
.sparkols-mail-template-area-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.sparkols-mail-template-area-title {
  color: #0f172a;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
}
.sparkols-mail-template-area-head .sparkols-muted {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.5;
}
.sparkols-mail-template-tabs {
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.sparkols-mail-template-hint {
  margin-bottom: 12px;
  font-size: 12px;
  line-height: 1.5;
}
.sparkols-mail-template-area-body {
  min-width: 0;
}
.sparkols-mail-template-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.sparkols-mail-template-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 220px;
  padding: 14px;
  border: 1px solid #dbe4ee;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.sparkols-mail-template-group-card {
  min-height: 170px;
}
.sparkols-mail-template-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.sparkols-mail-template-card-title {
  color: #0f172a;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.sparkols-mail-template-card-key {
  margin-top: 3px;
  color: #64748b;
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.sparkols-mail-template-card-actions {
  display: flex;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}
.sparkols-mail-template-card-meta,
.sparkols-mail-template-card-langs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.sparkols-mail-template-card-meta span,
.sparkols-mail-template-lang-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border: 1px solid #dbe4ee;
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  font-size: 11px;
  line-height: 1.2;
}
.sparkols-mail-template-lang-chip {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
  font-weight: 600;
}
.sparkols-mail-template-subject {
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sparkols-mail-template-preview-box {
  flex: 1;
  min-height: 84px;
  max-height: 132px;
  overflow: hidden;
  color: #64748b;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.sparkols-mail-template-editor-card {
  width: min(1180px, 96vw);
  max-height: min(860px, 94vh);
}
.sparkols-mail-template-group-editor-card {
  width: min(1120px, 96vw);
  max-height: min(860px, 94vh);
}
.sparkols-mail-template-ai-panel,
.sparkols-mail-template-editor-section {
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}
.sparkols-mail-template-ai-panel {
  border-color: #bbf7d0;
  background: #f0fdf4;
}
.sparkols-mail-template-ai-head,
.sparkols-mail-template-section-head,
.sparkols-mail-template-version-head,
.sparkols-mail-template-pool-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.sparkols-mail-template-ai-head {
  margin-bottom: 10px;
}
.sparkols-mail-template-ai-head b,
.sparkols-mail-template-section-head b {
  display: block;
  color: #0f172a;
  font-size: 14px;
  line-height: 1.35;
}
.sparkols-mail-template-ai-head span,
.sparkols-mail-template-section-head span {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.4;
}
.sparkols-mail-template-ai-controls {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  gap: 12px;
  margin-top: 10px;
  align-items: start;
}
.sparkols-mail-template-ai-controls label,
.sparkols-mail-template-form-grid label,
.sparkols-mail-template-version-head label {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}
.sparkols-mail-template-field-label {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}
.sparkols-mail-template-lang-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 10px;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}
.sparkols-mail-template-lang-picker--compact {
  gap: 6px 10px;
  padding: 8px;
}
.sparkols-mail-template-lang-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #334155;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.sparkols-mail-template-lang-option input,
.sparkols-mail-template-inline-check input {
  width: 16px;
  height: 16px;
  min-height: 0;
  flex: 0 0 auto;
}
.sparkols-mail-template-ai-status {
  margin-top: 8px;
  font-size: 12px;
}
.sparkols-mail-template-form-grid {
  display: grid;
  grid-template-columns: minmax(170px, 220px) minmax(240px, 1fr) minmax(160px, 190px) minmax(150px, auto);
  gap: 12px;
  align-items: end;
}
.sparkols-mail-template-form-grid--group {
  grid-template-columns: minmax(260px, 1fr) minmax(190px, 220px) minmax(110px, 130px) minmax(170px, auto);
}
.sparkols-mail-template-inline-check {
  display: inline-flex !important;
  min-width: 0;
  flex-direction: row !important;
  align-items: center;
  gap: 8px;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.sparkols-mail-template-inline-check--compact {
  align-self: end;
  min-height: 40px;
}
.sparkols-mail-template-version-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.sparkols-mail-template-version {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #f8fbff;
}
.sparkols-mail-template-version-subject {
  flex: 1;
}
.sparkols-mail-template-version textarea {
  min-height: 190px;
  resize: vertical;
}
.sparkols-mail-template-pool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
  margin-top: 12px;
  max-height: 480px;
  overflow: auto;
  padding-right: 2px;
}
.sparkols-mail-template-pool-card {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-height: 260px;
  padding: 12px;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #fff;
}
.sparkols-mail-template-weight-field {
  display: flex;
  width: 84px;
  flex-direction: column;
  gap: 4px;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}
.sparkols-mail-template-weight-field input {
  min-width: 0;
}
.sparkols-inf-td-input .sparkols-input,
.sparkols-inf-td-input textarea.sparkols-inf-editable {
  min-width: 64px;
  max-width: 168px;
  font-size: 11px;
  box-sizing: border-box;
}
.sparkols-inf-td-input textarea.sparkols-inf-editable {
  min-height: 40px;
  resize: vertical;
}
.sparkols-td-actions {
  white-space: nowrap;
  vertical-align: middle;
}
/* 红人池非编辑态：与表格正文一致的只读展示 */
.sparkols-inf-cell-view {
  font-size: 12px;
  color: #1e293b;
  line-height: 1.45;
  vertical-align: top;
  word-break: break-word;
}
.sparkols-influencer-pool-table th,
.sparkols-influencer-pool-table td {
  padding: 8px 9px;
  vertical-align: top;
}
.sparkols-influencer-pool-table tbody tr {
  height: auto;
}
.sparkols-influencer-pool-table .sparkols-inf-cell-view {
  max-width: 180px;
}
.sparkols-influencer-pool-table .sparkols-inf-cell-compact {
  max-width: 220px;
}
.sparkols-influencer-pool-table .sparkols-inf-cell-clip {
  max-height: 42px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: normal;
  overflow-wrap: anywhere;
}
.sparkols-influencer-pool-table td:nth-child(1),
.sparkols-influencer-pool-table td:nth-child(2),
.sparkols-influencer-pool-table td:nth-child(3),
.sparkols-influencer-pool-table td:nth-child(8),
.sparkols-influencer-pool-table td:nth-child(9),
.sparkols-influencer-pool-table td:nth-child(10),
.sparkols-influencer-pool-table td:nth-child(13),
.sparkols-influencer-pool-table td:nth-child(17),
.sparkols-influencer-pool-table td:nth-child(18),
.sparkols-influencer-pool-table td:nth-child(19),
.sparkols-influencer-pool-table td:nth-child(20),
.sparkols-influencer-pool-table td:nth-child(23),
.sparkols-influencer-pool-table td:nth-child(24),
.sparkols-influencer-pool-table td:nth-child(25),
.sparkols-influencer-pool-table td:nth-child(26),
.sparkols-influencer-pool-table td:nth-child(29),
.sparkols-influencer-pool-table td:nth-child(30) {
  white-space: nowrap;
}
.sparkols-influencer-pool-table td:nth-child(4),
.sparkols-influencer-pool-table td:nth-child(5),
.sparkols-influencer-pool-table td:nth-child(6) {
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sparkols-influencer-pool-table td:nth-child(11),
.sparkols-influencer-pool-table td:nth-child(12) {
  min-width: 190px;
}
.sparkols-inf-cell-view .sparkols-pf {
  vertical-align: middle;
}
.sparkols-lead-reply-panel {
  max-width: 720px;
  width: 96vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}
/* 覆盖下方 .sparkols-submit-modal-panel 的 max-width:440px，避免线索回复窗被压窄 */
.sparkols-submit-modal-panel.sparkols-lead-reply-panel {
  max-width: min(1040px, 96vw);
  width: 100%;
}
.sparkols-lead-reply-scroll {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  padding-right: 4px;
}

.sparkols-submit-modal-panel.sparkols-review-detail-panel {
  max-width: min(920px, 96vw);
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

#review-detail-body.sparkols-lead-reply-scroll {
  max-height: min(68vh, 560px);
}

.sparkols-review-detail-section {
  margin-bottom: 14px;
}

.sparkols-review-detail-section h4 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
}

.sparkols-detail-pre {
  margin: 6px 0 0;
  padding: 10px 12px;
  font-size: 11px;
  line-height: 1.45;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}
.sparkols-lead-reply-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px 12px;
  margin-bottom: 10px;
}
.sparkols-lead-reply-grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: #475569;
}
.sparkols-lead-reply-span2 {
  grid-column: 1 / -1;
}
.sparkols-lead-reply-actions {
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.sparkols-td-audit-remark {
  max-width: 220px;
  min-width: 120px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: normal;
  vertical-align: top;
}
.sparkols-submit-options-box {
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fafafa;
}
.sparkols-check-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 6px 0;
  font-size: 13px;
  line-height: 1.35;
  cursor: pointer;
}
.sparkols-check-row input {
  margin-top: 3px;
  flex-shrink: 0;
}
.sparkols-review-exec-cell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  max-width: 260px;
}
.sparkols-review-exec-cell .sparkols-inf-select {
  min-width: 120px;
  flex: 1;
}
.sparkols-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: #ecfeff;
  color: #0e7490;
  font-size: 11px;
}
.sparkols-badge-audit {
  background: #ede9fe;
  color: #5b21b6;
  font-weight: 600;
}
.sparkols-badge-ok {
  background: #dcfce7;
  color: #166534;
  font-weight: 700;
  border: 1px solid #bbf7d0;
}
.sparkols-badge--bd-danger {
  background: #fee2e2;
  color: #991b1b;
  font-weight: 700;
  border: 1px solid #fecaca;
}
.sparkols-template-var-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 10px;
}
.sparkols-template-var-chip {
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  border-radius: 6px;
  padding: 5px 9px;
  font-size: 12px;
  line-height: 1.2;
  cursor: pointer;
}
.sparkols-template-var-chip:hover {
  border-color: #2563eb;
  color: #1d4ed8;
  background: #eff6ff;
}
.sparkols-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 280px;
}
.sparkols-admin-bar {
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
}
.sparkols-inbox-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sparkols-inbox-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fbfdff;
}
.sparkols-inbox-line1 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  line-height: 1.4;
}
.sparkols-inbox-meta {
  margin-top: 6px;
  font-size: 12px;
}
.sparkols-link {
  color: #0284c7;
  text-decoration: none;
  font-size: 12px;
}
.sparkols-link:hover {
  text-decoration: underline;
}

/* ---------- Sparkols 登录页：左品牌 + 右表单 ---------- */
#login-overlay.home-auth-overlay {
  align-items: center;
  justify-content: center;
  padding: 28px;
  box-sizing: border-box;
  background:
    radial-gradient(circle at 12% 8%, rgba(56, 189, 248, 0.12), transparent 32%),
    radial-gradient(circle at 88% 92%, rgba(45, 212, 191, 0.1), transparent 30%),
    #eef3f8;
}

.home-auth-frame {
  display: flex;
  width: 100%;
  max-width: 1080px;
  min-height: min(660px, calc(100vh - 56px));
  border-radius: 24px;
  overflow: hidden;
  box-shadow:
    0 36px 90px -34px rgba(15, 23, 42, 0.35),
    0 0 0 1px rgba(148, 163, 184, 0.16);
  background: #fff;
}

.home-auth-brand {
  position: relative;
  flex: 0 0 46%;
  min-width: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 75% 18%, rgba(34, 211, 238, 0.16), transparent 31%),
    radial-gradient(circle at 8% 85%, rgba(20, 184, 166, 0.13), transparent 34%),
    linear-gradient(150deg, #0b2239 0%, #081522 58%, #050b14 100%);
  color: #e2e8f0;
  display: flex;
  align-items: stretch;
  padding: 52px 48px;
  box-sizing: border-box;
}

.home-auth-brand::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.17;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.16) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(to bottom right, black, transparent 72%);
}

.home-auth-brand-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 390px;
  min-height: 100%;
}

.home-auth-brand-row {
  display: flex;
  align-items: center;
  gap: 13px;
}

.home-auth-logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: linear-gradient(135deg, #67e8f9, #22d3ee 48%, #14b8a6);
  color: #06273a;
  font-weight: 800;
  font-size: 21px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 28px rgba(34, 211, 238, 0.22);
}

.home-auth-logo-text {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #f8fafc;
}

.home-auth-tagline {
  margin: 2px 0 0;
  font-size: 10px;
  color: rgba(148, 163, 184, 0.95);
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.home-auth-hero-copy {
  margin-top: auto;
  margin-bottom: auto;
  padding: 56px 0 44px;
}

.home-auth-brand-eyebrow {
  display: block;
  margin-bottom: 16px;
  color: #5eead4;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.home-auth-hero-copy h1 {
  margin: 0;
  color: #f8fafc;
  font-size: clamp(28px, 2.6vw, 38px);
  line-height: 1.28;
  letter-spacing: -0.04em;
  font-weight: 700;
}

.home-auth-hero-copy p {
  max-width: 330px;
  margin: 20px 0 0;
  color: rgba(203, 213, 225, 0.78);
  font-size: 13px;
  line-height: 1.8;
}

.home-auth-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.home-auth-feature-grid > div {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 13px 10px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(226, 232, 240, 0.82);
  font-size: 10px;
}

.home-auth-feature-grid svg {
  width: 16px;
  height: 16px;
  color: #67e8f9;
}

.home-auth-system-status {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 18px;
  color: rgba(148, 163, 184, 0.78);
  font-size: 10px;
}

.home-auth-system-status span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.1);
}

.home-auth-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 38px 42px;
  background: #fff;
}

#login-overlay.home-auth-overlay .login-modal.home-auth-card {
  width: 100%;
  max-width: 440px;
  margin: 0;
  padding: 0;
  box-shadow: none;
  border-radius: 0;
}

#login-overlay.home-auth-overlay .login-modal h2,
.home-auth-title {
  margin: 0 0 8px;
  font-size: 27px;
  font-weight: 700;
  color: #0f172a;
  text-align: left;
  letter-spacing: -0.035em;
}

.home-auth-welcome {
  margin: 0 0 8px;
  font-size: 10px;
  font-weight: 700;
  color: #0f766e;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.home-auth-sub {
  margin: 0 0 24px;
  font-size: 13px;
  color: #64748b;
  text-align: left;
}

.home-auth-heading-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

#login-overlay.home-auth-overlay .login-form input {
  margin-bottom: 12px;
}

#login-overlay.home-auth-overlay .login-form button {
  margin-top: 8px;
  background: #0f766e;
  border-radius: 10px;
}

#login-overlay.home-auth-overlay .login-form button:hover {
  background: #115e59;
}

#login-overlay.home-auth-overlay .login-tab.active {
  color: #0f766e;
  border-bottom-color: transparent;
}

.home-auth-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 6px;
}

.home-auth-register-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 22px;
}

.home-auth-register-head > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.home-auth-register-head strong {
  color: #0f172a;
  font-size: 17px;
}

.home-auth-register-head span {
  color: #64748b;
  font-size: 11px;
}

#login-overlay.home-auth-overlay .login-back-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: auto;
  margin: 0;
  padding: 6px 0;
  background: transparent;
  color: #64748b;
  border: 0;
  border-radius: 0;
  font-size: 11px;
  white-space: nowrap;
}

#login-overlay.home-auth-overlay .login-back-button:hover {
  color: #0f766e;
  background: transparent;
}

.login-back-button svg {
  width: 14px;
  height: 14px;
}

.home-auth-legal {
  margin: 22px 0 0;
  color: #94a3b8;
  font-size: 10px;
  text-align: center;
}

.home-auth-legal a {
  color: #64748b;
  text-decoration: none;
}

.home-auth-legal a:hover {
  color: #0f766e;
}

@media (max-width: 768px) {
  #login-overlay.home-auth-overlay {
    padding: 16px;
  }
  .home-auth-frame {
    flex-direction: column;
    min-height: auto;
    max-width: 480px;
    border-radius: 20px;
  }
  .home-auth-brand {
    flex: none;
    padding: 22px 24px;
  }
  .home-auth-brand-inner {
    max-width: none;
  }
  .home-auth-hero-copy,
  .home-auth-feature-grid,
  .home-auth-system-status {
    display: none;
  }
  .home-auth-main {
    padding: 30px 24px 28px;
  }
  .home-auth-title {
    font-size: 24px;
  }
}

@media (max-width: 420px) {
  .home-auth-main {
    padding: 26px 18px 24px;
  }
}

/* ---------- 登录页视觉方向 v2：极简表单 + 编辑式视觉画布 ---------- */
#login-overlay.home-auth-overlay {
  padding: 26px;
  background:
    radial-gradient(circle at 15% 15%, rgba(112, 74, 255, 0.08), transparent 28%),
    radial-gradient(circle at 86% 84%, rgba(34, 211, 238, 0.09), transparent 26%),
    #f3f5f7;
}

#login-overlay .home-auth-frame {
  max-width: 1120px;
  min-height: min(690px, calc(100vh - 52px));
  border-radius: 26px;
  background: #ffffff;
  box-shadow:
    0 42px 100px -42px rgba(30, 41, 59, 0.34),
    0 0 0 1px rgba(148, 163, 184, 0.16);
}

#login-overlay .home-auth-main {
  order: 1;
  flex: 0 0 47%;
  padding: 44px 56px;
  background: #ffffff;
}

#login-overlay .home-auth-brand {
  order: 2;
  position: relative;
  flex: 1;
  overflow: hidden;
  padding: 0;
  background: #1344d8;
}

#login-overlay .home-auth-brand::after {
  display: none;
}

.home-auth-visual-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
}

.home-auth-visual-topline {
  position: absolute;
  z-index: 2;
  top: 28px;
  left: 30px;
  right: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.9);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.home-auth-visual-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(5, 13, 36, 0.24);
  backdrop-filter: blur(10px);
}

.home-auth-visual-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #b8ff2c;
  box-shadow: 0 0 0 4px rgba(184, 255, 44, 0.18);
}

.home-auth-visual-caption {
  position: absolute;
  z-index: 2;
  left: 30px;
  right: 30px;
  bottom: 28px;
  padding: 20px 22px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 18px;
  background: rgba(3, 12, 38, 0.34);
  color: #ffffff;
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 48px rgba(0, 16, 72, 0.22);
}

.home-auth-visual-caption span {
  display: block;
  margin-bottom: 8px;
  color: #c9ff4a;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.home-auth-visual-caption strong {
  font-size: 20px;
  line-height: 1.35;
  letter-spacing: -0.025em;
}

#login-overlay .home-auth-card {
  max-width: 410px;
}

#login-overlay .home-auth-main .home-auth-brand-row {
  gap: 11px;
  margin-bottom: 42px;
}

#login-overlay .home-auth-main .home-auth-logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: #111827;
  color: #ffffff;
  box-shadow: none;
  font-size: 18px;
}

#login-overlay .home-auth-main .home-auth-logo-text {
  color: #111827;
  font-size: 18px;
}

#login-overlay .home-auth-main .home-auth-tagline {
  color: #9aa3b2;
  font-size: 8px;
}

#login-overlay .home-auth-welcome {
  margin-bottom: 9px;
  color: #6d32e8;
  font-size: 9px;
}

#login-overlay .home-auth-title {
  margin-bottom: 7px;
  color: #101828;
  font-size: 32px;
  letter-spacing: -0.045em;
}

#login-overlay .home-auth-sub {
  margin-bottom: 22px;
  color: #7c8798;
  font-size: 12px;
}

#login-overlay.home-auth-overlay .login-form .login-role-option {
  justify-content: center;
  min-height: 42px;
  padding: 8px 9px;
  color: #687386;
  background: transparent;
  border: 0;
  border-radius: 9px;
}

#login-overlay.home-auth-overlay .login-form .login-role-option:hover {
  color: #111827;
  background: rgba(255, 255, 255, 0.78);
  border-color: transparent;
}

#login-overlay.home-auth-overlay .login-form .login-role-option.active {
  color: #111827;
  background: #ffffff;
  border-color: transparent;
  box-shadow:
    0 5px 14px rgba(15, 23, 42, 0.08),
    0 0 0 1px rgba(148, 163, 184, 0.12);
}

#login-overlay .login-role-switcher {
  gap: 3px;
  margin-bottom: 16px;
  padding: 4px;
  border-radius: 12px;
  background: #f1f3f6;
}

#login-overlay .login-role-option svg {
  width: 15px;
  height: 15px;
  flex-basis: 15px;
}

#login-overlay.home-auth-overlay .google-login-button {
  min-height: 46px;
  border-color: #dfe3e8;
  border-radius: 10px;
  box-shadow: none;
  font-size: 12px;
}

#login-overlay.home-auth-overlay .google-login-button:hover {
  border-color: #b9c1cc;
  background: #fafafa;
  box-shadow: 0 5px 14px rgba(15, 23, 42, 0.06);
}

#login-overlay .google-login-hint {
  margin-top: 7px;
  color: #a1a8b3;
  font-size: 9px;
}

#login-overlay .home-auth-divider {
  margin: 16px 0 14px;
  color: #a1a8b3;
  font-size: 10px;
}

#login-overlay .home-auth-label {
  margin-bottom: 5px;
  color: #5f6978;
  font-size: 10px;
}

#login-overlay .home-auth-field {
  margin-bottom: 11px;
}

#login-overlay.home-auth-overlay .home-auth-field input {
  min-height: 44px;
  border-color: #e0e4e9;
  border-radius: 9px;
  font-size: 12px;
}

#login-overlay.home-auth-overlay .home-auth-field input:focus {
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

#login-overlay.home-auth-overlay .login-form .credential-login-button {
  min-height: 45px;
  border-radius: 10px;
  background: #6d32e8;
  box-shadow: 0 10px 22px rgba(109, 50, 232, 0.2);
  font-size: 12px;
}

#login-overlay.home-auth-overlay .login-form .credential-login-button:hover {
  background: #5b25cf;
}

#login-overlay .home-auth-mode-link {
  margin-top: 13px;
  color: #858e9c;
  font-size: 10px;
}

#login-overlay.home-auth-overlay .login-form .home-auth-mode-link .login-tab {
  color: #6d32e8;
  font-size: 10px;
}

#login-overlay .home-auth-legal {
  margin-top: 18px;
  font-size: 9px;
}

@media (max-width: 900px) {
  #login-overlay .home-auth-main {
    flex-basis: 55%;
    padding: 38px;
  }
}

@media (max-width: 720px) {
  #login-overlay.home-auth-overlay {
    padding: 14px;
  }

  #login-overlay .home-auth-frame {
    max-width: 480px;
    min-height: auto;
    border-radius: 22px;
  }

  #login-overlay .home-auth-brand {
    display: none;
  }

  #login-overlay .home-auth-main {
    order: 1;
    flex: 1;
    padding: 28px 24px 24px;
  }

  #login-overlay .home-auth-main .home-auth-brand-row {
    margin-bottom: 30px;
  }

  #login-overlay .home-auth-title {
    font-size: 28px;
  }
}

/* ---------- 平台徽章（线索 / 红人原始来源） ---------- */
.sparkols-pf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  border: 1px solid transparent;
}

.sparkols-pf--tiktok {
  background: #0f172a;
  color: #f8fafc;
  border-color: #334155;
}

.sparkols-pf--youtube {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

.sparkols-pf--instagram {
  background: linear-gradient(120deg, #fce7f3 0%, #e0e7ff 100%);
  color: #831843;
  border-color: #f9a8d4;
}

.sparkols-pf--x {
  background: #0f172a;
  color: #f8fafc;
  border-color: #475569;
}

.sparkols-pf--other {
  background: #f1f5f9;
  color: #475569;
  border-color: #cbd5e1;
}

.sparkols-inbox-identity {
  font-weight: 600;
  color: #0f172a;
}

.sparkols-field-label {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  margin-right: 4px;
}

.sparkols-select {
  min-width: 130px;
  cursor: pointer;
  background: #fff;
}

.sparkols-batch-block {
  margin-bottom: 16px;
  padding: 14px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
}
.sparkols-batch-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 8px;
}
.sparkols-textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  line-height: 1.45;
  resize: vertical;
  min-height: 120px;
}
.sparkols-quote-textarea {
  width: min(640px, 100%);
  min-height: 104px;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.5;
}
.sparkols-submit-quote-textarea {
  width: 100%;
  min-height: 112px;
}
.sparkols-submit-timeline-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 10px;
  margin: 10px 0 6px;
}
@media (max-width: 820px) {
  .sparkols-submit-timeline-grid {
    grid-template-columns: 1fr;
  }
}
.sparkols-batch-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.sparkols-lc {
  font-size: 11px;
  color: #0369a1;
  font-weight: 600;
}

/* 红人提报：整页表单弹层 */
.sparkols-submit-inline-err {
  color: #b91c1c;
  font-size: 12px;
  margin: 0 0 8px;
  line-height: 1.45;
}
.sparkols-inf-proj-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 4px;
  padding: 1px 6px;
  margin-right: 4px;
  vertical-align: middle;
}
.sparkols-inf-proj-draft-line {
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.4;
}
.sparkols-inf-proj-submitted-line {
  line-height: 1.45;
  word-break: break-word;
}
.sparkols-inf-proj-merged-cell {
  min-width: 180px;
  max-width: 280px;
  vertical-align: top;
}
.sparkols-submit-modal-wrap {
  position: fixed;
  inset: 0;
  z-index: 13000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 3vh, 28px) 18px;
  box-sizing: border-box;
}
.sparkols-submit-modal-wrap[style*="display: block"],
.sparkols-submit-modal-wrap[style*="display:block"] {
  display: flex !important;
}
.sparkols-submit-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.48);
}
.sparkols-submit-modal-panel {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: min(88vh, 760px);
  overflow: auto;
  background: #fff;
  border-radius: 12px;
  padding: 18px 20px 16px;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.22);
  box-sizing: border-box;
}

.sparkols-crm-thread-head,
.sparkols-crm-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}
.sparkols-crm-analysis,
.sparkols-crm-grid > div,
.sparkols-crm-msg {
  border: 1px solid #dbe4ef;
  background: #fff;
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 10px;
}
.sparkols-crm-analysis {
  background: #f0f7ff;
  border-color: #bfdbfe;
}
.sparkols-crm-grid {
  grid-template-columns: minmax(240px, 0.8fr) minmax(320px, 1.2fr);
}
.sparkols-crm-suggestion {
  white-space: pre-wrap;
  word-break: break-word;
  margin: 8px 0 0;
  color: #334155;
  font-family: inherit;
  line-height: 1.55;
}
.sparkols-crm-msg-meta {
  color: #64748b;
  font-size: 12px;
  margin-bottom: 6px;
}
.sparkols-crm-msg-body {
  white-space: pre-wrap;
  word-break: break-word;
  color: #0f172a;
  line-height: 1.55;
}
.sparkols-crm-msg-inbound {
  border-left: 3px solid #0f766e;
}
.sparkols-crm-msg-outbound {
  border-left: 3px solid #2563eb;
}
@media (max-width: 760px) {
  .sparkols-crm-thread-head,
  .sparkols-crm-grid {
    grid-template-columns: 1fr;
  }
}

.sparkols-submit-modal-panel.sparkols-export-panel {
  max-width: 980px;
}

.sparkols-submit-modal-panel.sparkols-mail-ai-panel {
  width: min(1280px, 96vw);
  max-width: min(1280px, 96vw);
  height: min(940px, 94vh);
  max-height: 94vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#mail-inbox-detail-modal-body {
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: auto;
  padding-right: 4px;
}

.sparkols-mail-ai-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.sparkols-mail-creator-card {
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #ffffff;
  padding: 8px 10px;
}

.sparkols-mail-creator-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 2px;
  color: #334155;
}

.sparkols-mail-creator-card {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px 8px;
  flex: 0 0 auto;
}

.sparkols-mail-creator-head {
  grid-column: 1 / -1;
}

.sparkols-mail-creator-card > p {
  grid-column: 1 / -1;
}

.sparkols-mail-creator-row {
  min-width: 0;
  border: 1px solid #eef2f7;
  border-radius: 6px;
  padding: 5px 7px;
  background: #f8fafc;
}

.sparkols-mail-creator-row span {
  display: block;
  font-size: 10px;
  color: #64748b;
  margin-bottom: 2px;
}

.sparkols-mail-creator-row strong {
  display: block;
  color: #0f172a;
  font-size: 11px;
  font-weight: 600;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
  line-height: 1.35;
  max-height: 4.1em;
  overflow: auto;
}

.sparkols-mail-creator-row strong a {
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.sparkols-mail-ai-quote-card {
  margin-top: 10px;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #ffffff;
  padding: 10px;
}

.sparkols-mail-ai-quote-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.sparkols-mail-ai-quote-head b {
  display: block;
  color: #0f172a;
  font-size: 13px;
}

.sparkols-mail-ai-quote-head span {
  display: block;
  margin-top: 2px;
  color: #64748b;
  font-size: 11px;
}

.sparkols-mail-ai-quote-rows {
  display: grid;
  gap: 6px;
}

.sparkols-mail-ai-quote-rows > div {
  border: 1px solid #eef2f7;
  border-radius: 6px;
  background: #f8fafc;
  padding: 7px 8px;
}

.sparkols-mail-ai-quote-rows > div.is-warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.sparkols-mail-ai-quote-rows > div.is-danger {
  border-color: #fecaca;
  background: #fef2f2;
}

.sparkols-mail-ai-quote-rows span {
  display: block;
  margin-bottom: 3px;
  color: #64748b;
  font-size: 10px;
}

.sparkols-mail-ai-quote-rows strong {
  display: block;
  color: #0f172a;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.sparkols-mail-ai-quote-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.sparkols-mail-lead-sync-state {
  margin: 8px 0 0;
  font-size: 12px;
  color: #64748b;
}

.sparkols-mail-lead-sync-state.is-ok {
  color: #047857;
}

.sparkols-mail-lead-sync-state.is-warn {
  color: #b45309;
}

.sparkols-confirm-template-bar {
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  border-radius: 8px;
  padding: 10px 12px;
  display: grid;
  gap: 8px;
}

.sparkols-confirm-template-top {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: baseline;
}

.sparkols-confirm-template-top b {
  color: #1e3a8a;
  font-size: 13px;
}

.sparkols-confirm-template-top span {
  color: #64748b;
  font-size: 12px;
}

.sparkols-confirm-template-controls {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) repeat(4, auto);
  gap: 8px;
  align-items: center;
}

.sparkols-confirm-template-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #334155;
}

@media (max-width: 720px) {
  .sparkols-confirm-template-controls {
    grid-template-columns: minmax(0, 1fr);
  }
}

.sparkols-template-editor-modal {
  position: fixed;
  inset: 0;
  z-index: 10080;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.38);
}

.sparkols-template-editor-card {
  width: min(860px, 96vw);
  max-height: min(760px, 92vh);
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: auto;
  padding: 18px;
  border-radius: 12px;
  border: 1px solid #dbe4ef;
  background: #fff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
}

.sparkols-template-editor-card.sparkols-mail-template-editor-card {
  width: min(1180px, 96vw);
  max-height: min(860px, 94vh);
}

.sparkols-template-editor-card.sparkols-mail-template-group-editor-card {
  width: min(1120px, 96vw);
  max-height: min(860px, 94vh);
}

.sparkols-template-editor-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.sparkols-template-editor-head b {
  display: block;
  color: #0f172a;
  font-size: 16px;
}

.sparkols-template-editor-head span {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
}

.sparkols-template-editor-textarea {
  min-height: 280px;
  resize: vertical;
}

.sparkols-template-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}

@media (max-width: 900px) {
  .sparkols-mail-template-ai-controls,
  .sparkols-mail-template-form-grid,
  .sparkols-mail-template-form-grid--group {
    grid-template-columns: minmax(0, 1fr);
  }
  .sparkols-mail-template-version-list,
  .sparkols-mail-template-pool-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.sparkols-mail-ai-grid {
  min-height: 0;
  flex: 0 0 clamp(280px, 36vh, 420px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

.sparkols-mail-ai-card {
  min-height: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.sparkols-mail-ai-card--single {
  flex: 1;
}

.sparkols-mail-ai-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.sparkols-mail-ai-pre {
  flex: 1;
  min-height: 220px;
  max-height: none;
  overflow: auto;
  margin: 0;
  padding: 12px;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 13px;
  line-height: 1.55;
  color: #0f172a;
  background: #fff;
}

.sparkols-mail-ai-frame {
  flex: 1;
  width: 100%;
  min-height: 220px;
  border: 0;
  background: #fff;
}

.sparkols-mail-ai-compose {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  gap: 10px 12px;
  align-items: start;
}

.sparkols-mail-ai-compose .sparkols-submit-label {
  margin: 0;
}

.sparkols-mail-reply-translate {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.sparkols-mail-reply-translate .sparkols-submit-label {
  grid-column: 1 / -1;
}

.sparkols-mail-reply-translate textarea {
  min-height: 86px;
}

.sparkols-mail-ai-summary,
.sparkols-mail-ai-draft {
  width: 100%;
  box-sizing: border-box;
}

.sparkols-mail-ai-summary {
  min-height: 82px;
}

.sparkols-mail-ai-draft {
  min-height: 132px;
}

.sparkols-mail-ai-panel .sparkols-submit-modal-actions {
  flex: 0 0 auto;
  margin-top: 0 !important;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
}

.sparkols-submit-modal-panel.sparkols-mail-translation-panel {
  width: min(860px, 92vw);
  max-width: min(860px, 92vw);
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sparkols-mail-translation-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sparkols-mail-translation-modal-text {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #f8fafc;
  color: #0f172a;
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 280px;
  overflow: auto;
}

.sparkols-submit-modal-panel.sparkols-mail-center-lookup-panel {
  width: min(1120px, 94vw);
  max-width: min(1120px, 94vw);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#mail-center-lookup-body {
  overflow: auto;
  min-height: 180px;
}

@media (max-width: 860px) {
  .sparkols-submit-modal-panel.sparkols-mail-ai-panel {
    height: 94vh;
  }
  .sparkols-mail-ai-grid,
  .sparkols-mail-ai-compose {
    grid-template-columns: 1fr;
  }
  .sparkols-mail-ai-grid {
    flex: 0 0 auto;
  }
  .sparkols-mail-creator-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sparkols-mail-ai-card {
    min-height: 220px;
  }
}

.sparkols-export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.sparkols-export-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  max-height: 56vh;
  overflow: auto;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.sparkols-export-preset-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-bottom: 12px;
  padding: 10px 12px;
  background: #f1f5f9;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}
.sparkols-export-preset-label {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  margin: 0;
}
.sparkols-export-preset-select {
  min-width: 200px;
  max-width: 100%;
}
.sparkols-export-preset-name {
  width: 140px;
  max-width: 100%;
}

.sparkols-export-field-group {
  min-width: 0;
}

.sparkols-export-field-group-title {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 6px;
}

.sparkols-export-field {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 5px 0;
  font-size: 12px;
  color: #475569;
}
.sparkols-submit-modal-title {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
}
.sparkols-submit-modal-sub {
  margin: 0 0 14px;
  font-size: 12px;
}
.sparkols-submit-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 6px;
  margin-top: 12px;
}
.sparkols-submit-label:first-of-type {
  margin-top: 0;
}
.sparkols-submit-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
  padding-top: 2px;
}

/* 审核页：导出 Excel 行勾选 */
.sparkols-th-review-export,
.sparkols-td-review-export {
  width: 40px;
  text-align: center;
  vertical-align: middle;
  padding-left: 6px;
  padding-right: 6px;
}
.sparkols-th-review-export input,
.sparkols-td-review-export input {
  margin: 0;
  cursor: pointer;
}

/* 审核页：附加信息结构化展示 */
.sparkols-td-review-payload {
  max-width: 280px;
  vertical-align: top;
  font-size: 12px;
  line-height: 1.45;
}
.sparkols-review-deliver-hist-holder {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed #cbd5e1;
}
.sparkols-review-deliver-hist-panel {
  margin-top: 8px;
  padding: 8px;
  max-height: 280px;
  overflow: auto;
  background: #f8fafc;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  font-size: 11px;
}
.sparkols-deliver-hist-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.sparkols-deliver-hist-li {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e2e8f0;
}
.sparkols-deliver-hist-li:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.sparkols-deliver-hist-li-head {
  font-size: 12px;
  color: #0f172a;
  margin-bottom: 4px;
}
.sparkols-deliver-hist-meta {
  font-size: 11px;
  color: #475569;
  margin-bottom: 4px;
}
.sparkols-deliver-hist-done {
  color: #15803d;
  font-weight: 600;
}
.sparkols-deliver-hist-pending {
  color: #b45309;
  font-weight: 600;
}
.sparkols-deliver-hist-row {
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.4;
}
.sparkols-deliver-hist-link {
  word-break: break-all;
}
.sparkols-review-payload {
  text-align: left;
}
.sparkols-payload-line {
  margin-bottom: 6px;
}
.sparkols-payload-line:last-child {
  margin-bottom: 0;
}
.sparkols-payload-k {
  display: inline-block;
  min-width: 4.5em;
  color: #64748b;
  font-weight: 600;
  margin-right: 6px;
}
.sparkols-payload-v {
  color: #0f172a;
  word-break: break-word;
}
.sparkols-payload-line--deliverable-media .sparkols-payload-v {
  display: block;
  margin-top: 4px;
}
.sparkols-payload-video-details {
  margin: 0;
}
.sparkols-payload-video-summary {
  cursor: pointer;
  user-select: none;
  color: #2563eb;
  font-size: 12px;
  font-weight: 500;
  list-style: none;
}
.sparkols-payload-video-summary::-webkit-details-marker {
  display: none;
}
.sparkols-payload-video-details[open] > .sparkols-payload-video-summary {
  margin-bottom: 8px;
}
.sparkols-payload-video {
  display: block;
  width: 100%;
  max-width: 260px;
  max-height: 260px;
  border-radius: 8px;
  background: #0f172a;
}
.sparkols-payload-video--hist {
  max-width: 220px;
  max-height: 200px;
}
.sparkols-payload-fallback {
  font-size: 11px;
  color: #475569;
  word-break: break-all;
}
.sparkols-td-review-actions {
  vertical-align: top;
  min-width: 140px;
}
.sparkols-review-remark {
  display: block;
  width: 100%;
  max-width: 220px;
  box-sizing: border-box;
  margin-bottom: 8px;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 12px;
  resize: vertical;
  font-family: inherit;
}
.sparkols-review-submit {
  display: block;
  width: 100%;
  max-width: 220px;
}

/* BD：可提报项目说明卡片 */
.sparkols-project-bd-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr));
  gap: 12px;
}
.sparkols-project-bd-card {
  min-width: 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: column;
}
.sparkols-project-card-skeleton {
  position: relative;
  min-height: 210px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: start;
  gap: 12px 10px;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.sparkols-project-card-skeleton .sparkols-page-skeleton-line.is-title {
  grid-column: 1;
}
.sparkols-project-card-skeleton .sparkols-page-skeleton-pill {
  grid-column: 2;
  justify-self: end;
}
.sparkols-project-card-skeleton .sparkols-page-skeleton-line {
  grid-column: 1 / -1;
}
.sparkols-project-bd-card h4 {
  margin: 0 0 6px;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.sparkols-project-bd-card h4 > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sparkols-priority-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  flex-shrink: 0;
}
.sparkols-project-bd-meta {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 4px;
  overflow-wrap: anywhere;
}
.sparkols-project-workbench-summary {
  margin: 8px 0 9px;
  padding: 10px 11px;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #f8fafc;
}
.sparkols-project-workbench-summary.is-ok {
  border-color: #bbf7d0;
  background: #f6fff9;
}
.sparkols-project-workbench-summary.is-warn {
  border-color: #fde68a;
  background: #fffbeb;
}
.sparkols-project-workbench-summary.is-risk {
  border-color: #fecaca;
  background: #fff7f7;
}
.sparkols-project-workbench-summary > div:first-child span,
.sparkols-project-workbench-summary > div:first-child b,
.sparkols-project-workbench-summary > div:first-child em {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sparkols-project-workbench-summary > div:first-child span {
  color: #64748b;
  font-size: 11px;
  font-weight: 850;
}
.sparkols-project-workbench-summary > div:first-child b {
  margin-top: 4px;
  color: #172033;
  font-size: 13px;
  font-weight: 900;
}
.sparkols-project-workbench-summary > div:first-child em {
  margin-top: 3px;
  color: #64748b;
  font-size: 11px;
  font-style: normal;
}
.sparkols-project-workbench-summary-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.sparkols-project-workbench-summary-chips span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 20px;
  padding: 2px 7px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: #475569;
  font-size: 11px;
  font-weight: 800;
}
.sparkols-project-workbench-summary-chips strong {
  color: #0f172a;
}
.sparkols-project-health {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 8px;
}
.sparkols-project-health-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  font-size: 11px;
  font-weight: 750;
}
.sparkols-project-health-chip.is-ok {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}
.sparkols-project-health-chip.is-warn {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}
.sparkols-project-health-chip.is-risk {
  border-color: #fecaca;
  background: #fff1f2;
  color: #b91c1c;
}
.sparkols-project-bd-next {
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.sparkols-project-inbox-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  align-items: center;
}
.sparkols-project-inbox-actions .sparkols-btn-xs {
  text-decoration: none;
}
.sparkols-campaign-workbench-panel {
  width: min(760px, calc(100vw - 34px));
}
.sparkols-campaign-workbench-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.sparkols-campaign-workbench-metrics div {
  min-width: 0;
  padding: 12px;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #fff;
}
.sparkols-campaign-workbench-metrics span,
.sparkols-campaign-workbench-metrics strong,
.sparkols-campaign-workbench-metrics em {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sparkols-campaign-workbench-metrics span {
  color: #64748b;
  font-size: 12px;
}
.sparkols-campaign-workbench-metrics strong {
  margin-top: 4px;
  color: #0f172a;
  font-size: 22px;
  font-weight: 900;
}
.sparkols-campaign-workbench-metrics em {
  margin-top: 4px;
  color: #475569;
  font-size: 12px;
  font-style: normal;
}
.sparkols-campaign-workbench-statuses,
.sparkols-campaign-workbench-risks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.sparkols-campaign-workbench-statuses span,
.sparkols-campaign-workbench-risks span {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  padding: 5px 9px;
  border: 1px solid #dbe4ef;
  border-radius: 999px;
  background: #fff;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}
.sparkols-campaign-workbench-statuses b,
.sparkols-campaign-workbench-statuses em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sparkols-campaign-workbench-statuses b {
  max-width: 220px;
}
.sparkols-campaign-workbench-statuses em {
  margin-left: 6px;
  color: #64748b;
  font-style: normal;
}
.sparkols-campaign-workbench-risks span.is-ok {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}
.sparkols-campaign-workbench-risks span.is-warn {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}
.sparkols-campaign-workbench-risks span.is-risk {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}
.sparkols-campaign-workbench-actions {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.sparkols-campaign-workbench-actions a,
.sparkols-campaign-workbench-actions button {
  display: block;
  min-width: 0;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #fff;
  color: #172033;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
  font: inherit;
}
.sparkols-campaign-workbench-actions a:hover,
.sparkols-campaign-workbench-actions button:hover {
  border-color: #93c5fd;
  background: #eff6ff;
}
.sparkols-campaign-workbench-actions .is-primary {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.12);
}
.sparkols-campaign-workbench-actions .is-disabled {
  background: #f8fafc;
  color: #94a3b8;
  cursor: default;
}
.sparkols-campaign-workbench-actions .is-disabled:hover {
  border-color: #dbe4ef;
  background: #f8fafc;
}
.sparkols-campaign-workbench-actions span,
.sparkols-campaign-workbench-actions b,
.sparkols-campaign-workbench-actions em {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sparkols-campaign-workbench-actions span {
  color: #2563eb;
  font-size: 11px;
  font-weight: 900;
}
.sparkols-campaign-workbench-actions .is-disabled span {
  color: #94a3b8;
}
.sparkols-campaign-workbench-actions b {
  margin-top: 5px;
  color: #172033;
  font-size: 13px;
  font-weight: 900;
}
.sparkols-campaign-workbench-actions .is-disabled b {
  color: #64748b;
}
.sparkols-campaign-workbench-actions em {
  margin-top: 4px;
  color: #64748b;
  font-size: 11px;
  font-style: normal;
}
.sparkols-campaign-workbench-queues {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.sparkols-campaign-workbench-queues a {
  display: block;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #fff;
  color: #172033;
  text-decoration: none;
}
.sparkols-campaign-workbench-queues a:hover {
  border-color: #93c5fd;
  background: #eff6ff;
}
.sparkols-campaign-workbench-queues a.is-active.is-risk {
  border-color: #fecaca;
  background: #fff7f7;
}
.sparkols-campaign-workbench-queues a.is-active.is-warn {
  border-color: #fde68a;
  background: #fffaf0;
}
.sparkols-campaign-workbench-queues a.is-active.is-ok {
  border-color: #bbf7d0;
  background: #f6fff9;
}
.sparkols-campaign-workbench-queues span,
.sparkols-campaign-workbench-queues strong,
.sparkols-campaign-workbench-queues em {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sparkols-campaign-workbench-queues span {
  color: #475569;
  font-size: 12px;
  font-weight: 850;
}
.sparkols-campaign-workbench-queues strong {
  margin-top: 5px;
  color: #0f172a;
  font-size: 18px;
  font-weight: 900;
}
.sparkols-campaign-workbench-queues em {
  margin-top: 4px;
  color: #64748b;
  font-size: 11px;
  font-style: normal;
}
.sparkols-campaign-workbench-preview {
  margin-top: 10px;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}
.sparkols-campaign-workbench-preview > b {
  display: block;
  padding: 9px 12px;
  border-bottom: 1px solid #e2e8f0;
  color: #172033;
  font-size: 12px;
  font-weight: 900;
}
.sparkols-campaign-workbench-preview a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  padding: 10px 12px;
  border-bottom: 1px solid #eef2f7;
  color: #172033;
  text-decoration: none;
}
.sparkols-campaign-workbench-preview a:last-child {
  border-bottom: 0;
}
.sparkols-campaign-workbench-preview a:hover {
  background: #f8fafc;
}
.sparkols-campaign-workbench-preview span,
.sparkols-campaign-workbench-preview em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sparkols-campaign-workbench-preview span {
  font-size: 13px;
  font-weight: 850;
}
.sparkols-campaign-workbench-preview em {
  grid-column: 1;
  color: #64748b;
  font-size: 12px;
  font-style: normal;
}
.sparkols-campaign-workbench-preview i {
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
  color: #94a3b8;
  font-size: 11px;
  font-style: normal;
}
.sparkols-campaign-workbench-flow {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.sparkols-campaign-workbench-flow a {
  display: block;
  min-width: 0;
  padding: 12px;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #fff;
  color: #172033;
  text-decoration: none;
}
.sparkols-campaign-workbench-flow a:hover {
  border-color: #93c5fd;
  background: #eff6ff;
}
.sparkols-campaign-workbench-flow b,
.sparkols-campaign-workbench-flow span,
.sparkols-campaign-workbench-customers b,
.sparkols-campaign-workbench-customers span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sparkols-campaign-workbench-flow b {
  font-size: 13px;
  font-weight: 900;
}
.sparkols-campaign-workbench-flow span {
  margin-top: 5px;
  color: #64748b;
  font-size: 12px;
}
.sparkols-campaign-workbench-checklist {
  display: grid;
  gap: 8px;
}
.sparkols-campaign-workbench-checklist div,
.sparkols-campaign-workbench-customers div {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}
.sparkols-campaign-workbench-checklist span {
  display: inline-flex;
  margin-bottom: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
}
.sparkols-campaign-workbench-checklist span.is-ok {
  background: #dcfce7;
  color: #166534;
}
.sparkols-campaign-workbench-checklist span.is-warn {
  background: #fef3c7;
  color: #92400e;
}
.sparkols-campaign-workbench-checklist span.is-risk {
  background: #fee2e2;
  color: #991b1b;
}
.sparkols-campaign-workbench-checklist b,
.sparkols-campaign-workbench-checklist em {
  display: block;
}
.sparkols-campaign-workbench-checklist b {
  color: #172033;
  font-size: 13px;
}
.sparkols-campaign-workbench-checklist em {
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
}
.sparkols-campaign-workbench-customers {
  display: grid;
  gap: 8px;
}
.sparkols-campaign-workbench-customers b {
  color: #172033;
  font-size: 13px;
}
.sparkols-campaign-workbench-customers span {
  margin-top: 5px;
  color: #64748b;
  font-size: 12px;
}
.sparkols-campaign-workbench-notes {
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}
.sparkols-campaign-workbench-notes b {
  display: block;
  color: #475569;
  font-size: 12px;
}
.sparkols-campaign-workbench-notes p {
  margin: 5px 0 12px;
  color: #334155;
  font-size: 12px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.sparkols-campaign-workbench-notes p:last-child {
  margin-bottom: 0;
}
@media (max-width: 720px) {
  .sparkols-campaign-workbench-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sparkols-campaign-workbench-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sparkols-campaign-workbench-queues {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sparkols-campaign-workbench-flow {
    grid-template-columns: 1fr;
  }
}
.sparkols-project-bd-block {
  font-size: 12px;
  line-height: 1.45;
  margin-top: 8px;
  color: #334155;
  min-width: 0;
  border-top: 1px solid #eef2f7;
  padding-top: 8px;
}
.sparkols-project-bd-block summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 8px;
  cursor: pointer;
  list-style: none;
  min-width: 0;
}
.sparkols-project-bd-block summary::-webkit-details-marker {
  display: none;
}
.sparkols-project-bd-block summary::after {
  content: '+';
  justify-self: end;
  color: #94a3b8;
  font-weight: 800;
}
.sparkols-project-bd-block[open] summary::after {
  content: '-';
}
.sparkols-project-bd-block summary strong {
  color: #475569;
  font-size: 11px;
  white-space: nowrap;
}
.sparkols-project-bd-block summary span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #64748b;
}
.sparkols-project-bd-block > div {
  margin-top: 7px;
  max-height: 210px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.sparkols-project-files {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
  min-width: 0;
}
.sparkols-project-files-compact {
  margin-top: 6px;
  gap: 4px;
}
.sparkols-project-file-link {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  padding: 6px 8px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #eff6ff;
  color: #1d4ed8;
  text-decoration: none;
  font-size: 12px;
  line-height: 1.3;
}
.sparkols-project-files-compact .sparkols-project-file-link {
  padding: 4px 6px;
  font-size: 11px;
}
.sparkols-project-file-link:hover {
  border-color: #93c5fd;
  background: #dbeafe;
}
.sparkols-project-file-kind {
  flex-shrink: 0;
  font-weight: 700;
  color: #0f766e;
}
.sparkols-project-file-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sparkols-project-file-meta {
  flex-shrink: 0;
  color: #64748b;
}
@media (max-width: 760px) {
  .sparkols-project-bd-cards {
    grid-template-columns: 1fr;
  }
}
.sparkols-project-file-box {
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  padding: 10px;
  background: #f8fafc;
}
.sparkols-project-file-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}
.sparkols-project-file-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  font-size: 12px;
}
.sparkols-project-file-row > a,
.sparkols-project-file-row > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sparkols-project-file-row-meta {
  margin-left: auto;
  flex-shrink: 0;
  color: #64748b;
}
.sparkols-project-file-row-pending {
  border-color: #bfdbfe;
  background: #eff6ff;
}
.sparkols-submit-projects-table td {
  vertical-align: top;
}
.sparkols-submit-drag-handle {
  cursor: grab;
  user-select: none;
  color: #94a3b8;
  font-size: 14px;
  line-height: 1.2;
  padding: 4px 4px 0 0;
  text-align: center;
  width: 36px;
}
.sparkols-submit-drag-handle:active {
  cursor: grabbing;
}
tr.sparkols-submit-dragging {
  opacity: 0.72;
}
.sparkols-spe-panel {
  max-width: 520px;
  width: 94vw;
}

/* 推进面板：问题反馈对话框 */
.sparkols-progress-qa-panel {
  max-width: 480px;
  width: 94vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
}
.sparkols-progress-qa-thread {
  flex: 1;
  min-height: 160px;
  max-height: 380px;
  overflow-y: auto;
  margin: 8px 0 12px;
  padding: 10px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}
.sparkols-qa-bubble-wrap {
  margin-bottom: 12px;
}
.sparkols-qa-bubble-wrap:last-child {
  margin-bottom: 0;
}
.sparkols-qa-bubble-meta {
  font-size: 11px;
  color: #64748b;
  margin-bottom: 4px;
  padding: 0 2px;
}
.sparkols-qa-bubble {
  max-width: 92%;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
.sparkols-qa-bubble-wrap--bd .sparkols-qa-bubble {
  background: #e0f2fe;
  color: #0c4a6e;
  margin-right: auto;
}
.sparkols-qa-bubble-wrap--aud .sparkols-qa-bubble {
  background: #d1fae5;
  color: #14532d;
  margin-left: auto;
}
.sparkols-td-ops .sparkols-btn-xs {
  display: inline-block;
  margin: 2px 4px 2px 0;
  vertical-align: middle;
}

/* 待处理：审核催促条（置顶红色） */
.sparkols-inbox-urge-stack {
  margin-bottom: 16px;
}
.sparkols-inbox-urge-bar {
  background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
  color: #fff;
  border-radius: 12px;
  padding: 0;
  margin-bottom: 10px;
  box-shadow: 0 8px 24px rgba(185, 28, 28, 0.35);
}
.sparkols-inbox-urge-inner {
  padding: 14px 16px 16px;
}
.sparkols-inbox-urge-title {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
}
.sparkols-inbox-urge-meta {
  font-size: 12px;
  opacity: 0.9;
  margin-top: 6px;
}
.sparkols-inbox-urge-msg {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.sparkols-inbox-urge-ack {
  margin-top: 12px;
  background: #fff;
  color: #b91c1c;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  cursor: pointer;
}
.sparkols-inbox-urge-ack:hover {
  filter: brightness(0.97);
}
.sparkols-urge-pending {
  color: #c2410c;
  font-weight: 600;
}
.sparkols-urge-done {
  color: #0f766e;
  font-weight: 600;
}

/* 推进面板督办列：时间链紧凑版 */
.sparkols-progress-urge-cell {
  min-width: 200px;
  max-width: 320px;
}
.sparkols-progress-urge-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.sparkols-row-urge-card {
  width: min(220px, 100%);
  border: 1px solid #fecaca;
  background: #fff7f7;
  border-radius: 8px;
  padding: 8px;
  color: #7f1d1d;
}
.sparkols-row-urge-title {
  font-size: 12px;
  font-weight: 700;
  color: #991b1b;
}
.sparkols-row-urge-meta {
  margin-top: 2px;
  font-size: 10px;
  color: #b45309;
}
.sparkols-row-urge-msg {
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.4;
  word-break: break-word;
}
.sparkols-row-urge-card .sparkols-inbox-urge-ack {
  margin-top: 7px;
}
.sparkols-progress-bd-urge-banner {
  margin-bottom: 14px;
}
.sparkols-progress-bd-urge-banner-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 8px;
}
.sparkols-bd-urge-history-panel {
  max-width: 500px;
  width: 94vw;
  max-height: min(84vh, 680px);
  display: flex;
  flex-direction: column;
}
.sparkols-bd-urge-history-mount {
  flex: 1;
  min-height: 200px;
  max-height: min(62vh, 520px);
  overflow-y: auto;
  margin: 8px 0 12px;
  padding: 4px 2px 8px 0;
}
.sparkols-urge-timeline--compact {
  margin-left: 4px;
  padding-left: 14px;
  border-left-width: 2px;
  margin-bottom: 8px;
}
.sparkols-urge-timeline--compact .sparkols-urge-tl-item {
  margin-bottom: 10px;
}
.sparkols-urge-timeline--compact .sparkols-urge-tl-item::before {
  left: -20px;
  top: 10px;
  width: 9px;
  height: 9px;
}
.sparkols-urge-timeline--compact .sparkols-urge-tl-card {
  padding: 7px 9px;
}
.sparkols-urge-timeline--compact .sparkols-urge-tl-time {
  font-size: 11px;
}
.sparkols-urge-timeline--compact .sparkols-urge-tl-msg,
.sparkols-urge-timeline--compact .sparkols-urge-tl-reply {
  font-size: 11px;
  margin-top: 4px;
}
.sparkols-urge-timeline--compact .sparkols-urge-chip {
  font-size: 9px;
  padding: 1px 6px;
}
.sparkols-urge-timeline--compact .sparkols-urge-tl-foot {
  margin-top: 4px;
  font-size: 10px;
}

/* 推进面板：汇总条、状态年龄、概览动态 */
.sparkols-progress-stats-mount {
  margin-top: 10px;
}
.sparkols-progress-alerts-mount {
  margin-top: 12px;
}
.sparkols-progress-alerts {
  border: 1px solid #fecaca;
  background: #fff7f7;
  border-radius: 8px;
  padding: 12px;
}
.sparkols-progress-alerts.is-empty {
  border-color: #e2e8f0;
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
}
.sparkols-progress-alerts-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.sparkols-progress-alerts-head b {
  display: block;
  color: #991b1b;
  font-size: 14px;
}
.sparkols-progress-alerts-head span {
  display: block;
  margin-top: 2px;
  color: #64748b;
  font-size: 12px;
}
.sparkols-progress-alert-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}
.sparkols-progress-alert-group {
  border: 1px solid #fee2e2;
  background: #fff;
  border-radius: 8px;
  padding: 10px;
}
.sparkols-progress-alert-group-title {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.sparkols-progress-alert-group-title b {
  color: #0f172a;
  font-size: 13px;
}
.sparkols-progress-alert-group-title span {
  color: #b91c1c;
  font-size: 12px;
  font-weight: 700;
}
.sparkols-progress-alert-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid #f1f5f9;
  background: #f8fafc;
  border-radius: 8px;
  padding: 8px 10px;
  margin-top: 7px;
  cursor: pointer;
}
.sparkols-progress-alert-item:hover {
  border-color: #fca5a5;
  background: #fff1f2;
}
.sparkols-progress-alert-item strong,
.sparkols-progress-alert-item span,
.sparkols-progress-alert-item em {
  display: block;
}
.sparkols-progress-alert-item strong {
  color: #0f172a;
  font-size: 13px;
}
.sparkols-progress-alert-item span {
  color: #64748b;
  font-size: 11px;
  margin-top: 2px;
}
.sparkols-progress-alert-item em {
  color: #7f1d1d;
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
  margin-top: 5px;
}
.sparkols-progress-flow-mount {
  margin-top: 10px;
}
.sparkols-progress-add-card {
  max-width: 760px;
  width: 94vw;
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
}
.sparkols-progress-add-card .sparkols-modal-head,
.sparkols-progress-add-card .sparkols-modal-actions {
  flex: 0 0 auto;
}
.sparkols-progress-add-card .sparkols-inf-add-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}
.sparkols-progress-add-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.sparkols-progress-add-grid label {
  min-width: 0;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
}
.sparkols-progress-add-grid .sparkols-input,
.sparkols-progress-add-grid .sparkols-textarea {
  margin-top: 5px;
}
.sparkols-progress-project-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 5px;
  padding: 8px;
  min-height: 40px;
  max-height: 120px;
  overflow: auto;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  background: #f8fafc;
}
.sparkols-progress-project-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 6px 9px;
  border: 1px solid #dbe3ef;
  border-radius: 999px;
  background: #fff;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}
.sparkols-progress-project-option input {
  width: 14px;
  height: 14px;
  margin: 0;
}
.sparkols-progress-project-option span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sparkols-progress-add-span2 {
  grid-column: 1 / -1;
}
.sparkols-progress-flow-guide {
  border: 1px solid #e2e8f0;
  background: #ffffff;
  border-radius: 8px;
  padding: 10px 12px;
}
.sparkols-progress-flow-title {
  font-size: 12px;
  color: #334155;
  margin-bottom: 8px;
}
.sparkols-progress-flow-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.sparkols-flow-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 11px;
  color: #334155;
}
button.sparkols-flow-chip {
  cursor: pointer;
  font-family: inherit;
}
button.sparkols-flow-chip:hover {
  border-color: #94a3b8;
  background: #f1f5f9;
}
button.sparkols-flow-chip.is-active {
  border-color: #0ea5e9;
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 700;
}
.sparkols-flow-chip strong {
  color: inherit;
  font-weight: 700;
}
.sparkols-flow-arrow {
  color: #94a3b8;
  font-size: 11px;
}
.sparkols-progress-flow-sub {
  margin-top: 8px;
  color: #64748b;
  font-size: 11px;
}

@media (max-width: 720px) {
  .sparkols-progress-add-grid {
    grid-template-columns: 1fr;
  }
  .sparkols-progress-add-span2 {
    grid-column: auto;
  }
}
.sparkols-flow-cell {
  min-width: 190px;
}
.sparkols-flow-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
}
.sparkols-flow-pill--active {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1e3a8a;
}
.sparkols-flow-pill--warn {
  border-color: #fcd34d;
  background: #fffbeb;
  color: #92400e;
}
.sparkols-flow-pill--ok {
  border-color: #86efac;
  background: #f0fdf4;
  color: #166534;
}
.sparkols-flow-pill--audit {
  border-color: #c4b5fd;
  background: #f5f3ff;
  color: #5b21b6;
}
.sparkols-flow-next {
  margin-top: 4px;
  font-size: 11px;
  color: #64748b;
}
.sparkols-progress-stats {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
  color: #334155;
}
.sparkols-progress-stats-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.sparkols-stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid #e2e8f0;
}
.sparkols-stat-chip--click {
  cursor: pointer;
}
.sparkols-stat-chip--click:hover {
  border-color: #94a3b8;
  background: #f1f5f9;
}
.sparkols-stat-chip--warn {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}
.sparkols-stat-filter-toggle {
  border-color: #cbd5e1;
  background: #ffffff;
  color: #334155;
}
.sparkols-stat-filter-toggle:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}
.sparkols-stat-meta {
  margin-left: auto;
  color: #64748b;
  font-size: 11px;
}
.sparkols-progress-stats-exec {
  display: none;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: 11px;
  color: #64748b;
}
.sparkols-progress-stats-exec.is-open {
  display: flex;
}
.sparkols-exec-count strong {
  color: #0f172a;
  font-weight: 600;
}
.sparkols-td-status-age {
  max-width: 220px;
  font-size: 11px;
}
.sparkols-progress-review-entry-cell {
  min-width: 76px;
  text-align: left;
  white-space: nowrap;
}
.sparkols-progress-review-jump {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 700;
}
.sparkols-progress-review-jump:hover {
  border-color: #60a5fa;
  background: #dbeafe;
}
.sparkols-status-age-inner {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sparkols-td-status-age .sparkols-progress-opinions {
  margin-top: 4px;
  white-space: normal;
}
.sparkols-td-status-age .sparkols-progress-opinion em {
  max-height: 46px;
}
.sparkols-rel-time {
  color: #64748b;
  white-space: nowrap;
}
.sparkols-stale-warn {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 4px;
  padding: 1px 6px;
}
.sparkols-progress-timeline-cell {
  min-width: 170px;
  max-width: 220px;
  color: #334155;
}
.sparkols-progress-timeline-cell > div:not(.sparkols-progress-timeline-alerts) {
  display: grid;
  grid-template-columns: 42px minmax(86px, 1fr);
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.sparkols-progress-timeline-cell > div:not(.sparkols-progress-timeline-alerts) > span {
  color: #64748b;
  font-size: 11px;
  white-space: nowrap;
}
.sparkols-progress-timeline-cell b {
  color: #0f172a;
  font-size: 11px;
  font-weight: 700;
}
.sparkols-timeline-date-input {
  width: 118px;
  min-width: 0;
  height: 26px;
  padding: 2px 6px;
  border: 1px solid #d8e2ee;
  border-radius: 6px;
  background: #fff;
  color: #0f172a;
  font-size: 11px;
  box-sizing: border-box;
}
.sparkols-progress-timeline-alerts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
}
.sparkols-progress-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 5200;
  display: flex;
  justify-content: flex-end;
  background: rgba(15, 23, 42, 0.28);
}
.sparkols-progress-drawer-panel {
  flex: 0 0 min(540px, calc(100vw - 28px)) !important;
  width: min(540px, calc(100vw - 28px)) !important;
  max-width: 540px;
  height: 100dvh;
  background: #f8fafc;
  box-shadow: -18px 0 42px rgba(15, 23, 42, 0.18);
  overflow-y: auto;
  color: #0f172a;
  animation: sparkols-progress-drawer-in 160ms ease-out;
}
@keyframes sparkols-progress-drawer-in {
  from {
    transform: translateX(28px);
    opacity: 0.72;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
.sparkols-progress-drawer-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 13px;
  border-bottom: 1px solid #e2e8f0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
}
.sparkols-progress-drawer-kicker {
  margin-bottom: 4px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}
.sparkols-progress-drawer-head h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.sparkols-progress-drawer-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.sparkols-progress-drawer-close {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border: 1px solid #d8e2ee;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.sparkols-progress-drawer-close:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}
.sparkols-progress-drawer-body {
  padding: 12px 14px 18px;
}
.sparkols-progress-drawer-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.sparkols-progress-drawer-summary > div {
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid #dbe4ef;
  border-radius: 10px;
  background: #fff;
}
.sparkols-progress-drawer-summary span,
.sparkols-progress-drawer-summary strong {
  display: block;
  min-width: 0;
}
.sparkols-progress-drawer-summary span {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 4px;
}
.sparkols-progress-drawer-summary strong {
  color: #0f172a;
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.sparkols-progress-drawer-edit {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}
.sparkols-progress-drawer-summary .sparkols-progress-drawer-edit {
  min-height: 30px;
  padding: 5px 7px;
}
textarea.sparkols-progress-drawer-edit {
  resize: vertical;
  font-weight: 500;
  line-height: 1.45;
}
.sparkols-progress-drawer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid #dbe4ef;
  border-radius: 10px;
  background: #fff;
}
.sparkols-progress-drawer-actions .sparkols-btn-xs {
  margin: 0;
  padding: 6px 10px;
  border-radius: 6px;
  line-height: 1.25;
  white-space: nowrap;
  word-break: keep-all;
}
.sparkols-progress-drawer-section {
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid #dbe4ef;
  border-radius: 10px;
  background: #fff;
}
.sparkols-progress-drawer-section:last-child {
  margin-bottom: 0;
}
.sparkols-progress-drawer-section h4 {
  margin: 0 0 9px;
  font-size: 13px;
  line-height: 1.35;
  color: #0f172a;
}
.sparkols-progress-drawer-section dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}
.sparkols-progress-drawer-field {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #eef2f7;
  border-radius: 8px;
  background: #fbfdff;
}
.sparkols-progress-drawer-field dt {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 4px;
}
.sparkols-progress-drawer-field dd {
  margin: 0;
  color: #0f172a;
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.sparkols-progress-drawer-section:last-child .sparkols-progress-drawer-field,
.sparkols-progress-drawer-field:has(.sparkols-progress-drawer-timeline),
.sparkols-progress-drawer-field:has(.sparkols-progress-drawer-text) {
  grid-column: 1 / -1;
}
.sparkols-progress-drawer-timeline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.sparkols-progress-drawer-timeline .sparkols-progress-drawer-field {
  padding: 7px 8px;
  background: #fff;
}
.sparkols-progress-drawer-text {
  max-height: 120px;
  overflow-y: auto;
  white-space: pre-wrap;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}
@media (max-width: 640px) {
  .sparkols-progress-drawer-panel {
    flex-basis: min(94vw, 540px) !important;
    width: min(94vw, 540px) !important;
  }
  .sparkols-progress-drawer-summary,
  .sparkols-progress-drawer-section dl,
  .sparkols-progress-drawer-timeline {
    grid-template-columns: minmax(0, 1fr);
  }
}
.sparkols-timeline-alert {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
}
.sparkols-timeline-alert.is-green {
  color: #047857;
  background: #ecfdf5;
  border-color: #a7f3d0;
}
.sparkols-timeline-alert.is-yellow {
  color: #a16207;
  background: #fefce8;
  border-color: #fde68a;
}
.sparkols-timeline-alert.is-red {
  color: #b91c1c;
  background: #fef2f2;
  border-color: #fecaca;
}

/* Sparkols 概览：收窄内容区、双栏并列，空状态为小卡片而非通栏白条 */
.sparkols-page-overview .sparkols-overview-wrap {
  max-width: 1080px;
  margin: 0 auto;
}
.sparkols-overview-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(124px, 1fr));
  gap: 10px;
  padding: 12px 14px !important;
  margin-bottom: 8px;
}
.sparkols-overview-kpis .home-kpi {
  padding: 8px 10px;
}
.sparkols-overview-kpis .home-kpi-value {
  margin-top: 4px;
  font-size: 18px;
}
.sparkols-overview-kpi-skeleton {
  display: block;
  width: 88px;
  max-width: 82%;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, #eef2f7 0%, #f8fafc 48%, #eef2f7 100%);
  background-size: 220% 100%;
  animation: sparkols-lead-skeleton 1.1s ease-in-out infinite;
}
.sparkols-overview-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
@media (min-width: 900px) {
  .sparkols-overview-grid {
    grid-template-columns: 1fr 1fr;
    gap: 18px 22px;
    align-items: start;
  }
}
.sparkols-overview-section {
  min-width: 0;
}
.sparkols-overview-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
  margin-bottom: 8px;
}
.sparkols-overview-section-head .sparkols-overview-activity-heading-main {
  font-size: 14px;
}
.sparkols-overview-empty {
  box-sizing: border-box;
  max-width: 280px;
  margin: 12px auto 18px;
  padding: 18px 16px 20px;
  text-align: center;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}
.sparkols-overview-empty-title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
}
.sparkols-overview-empty-hint {
  margin: 8px 0 0;
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.45;
}

.sparkols-overview-activity-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
  margin-bottom: 8px;
}
.sparkols-overview-activity-heading-main {
  font-weight: 600;
  color: #475569;
}
.sparkols-overview-activity-heading-sub {
  font-size: 12px;
  font-weight: 400;
}
.sparkols-overview-activity-panel {
  padding: 0;
  overflow: hidden;
  max-height: min(52vh, 520px);
  display: flex;
  flex-direction: column;
}
.sparkols-overview-activity-body {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 8px 14px 14px;
  -webkit-overflow-scrolling: touch;
}
.sparkols-overview-inbox-panel {
  padding: 0 !important;
  max-height: min(52vh, 520px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.sparkols-overview-inbox-body {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 10px 12px 12px;
  font-size: 13px;
  -webkit-overflow-scrolling: touch;
}
.sparkols-overview-inbox-body .sparkols-inbox-list {
  padding-bottom: 4px;
}
.sparkols-overview-skeleton-list {
  display: grid;
  gap: 10px;
}
.sparkols-overview-skeleton-card {
  min-height: 54px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  border-radius: 8px;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 18px minmax(80px, 140px) minmax(160px, 1fr) minmax(80px, 130px);
  gap: 12px;
  align-items: center;
}
.sparkols-overview-skeleton-dot,
.sparkols-overview-skeleton-badge,
.sparkols-overview-skeleton-line {
  display: block;
  background: linear-gradient(90deg, #eef2f7 0%, #f8fafc 48%, #eef2f7 100%);
  background-size: 220% 100%;
  animation: sparkols-lead-skeleton 1.1s ease-in-out infinite;
}
.sparkols-overview-skeleton-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
}
.sparkols-overview-skeleton-badge {
  width: 58px;
  height: 20px;
  border-radius: 6px;
  grid-column: span 1;
}
.sparkols-overview-skeleton-line {
  height: 12px;
  border-radius: 999px;
}
.sparkols-overview-skeleton-line.is-short {
  width: 96px;
}
.sparkols-overview-skeleton-line.is-wide {
  width: min(100%, 280px);
}
.sparkols-overview-skeleton-line.is-mid {
  width: 120px;
}
@media (max-width: 720px) {
  .sparkols-overview-skeleton-card {
    grid-template-columns: 18px minmax(80px, 1fr);
  }
  .sparkols-overview-skeleton-line.is-wide,
  .sparkols-overview-skeleton-line.is-mid {
    grid-column: 2;
  }
}
.sparkols-act-feed-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: linear-gradient(90deg, #f0fdfa 0%, #f8fafc 100%);
  border-bottom: 1px solid #e2e8f0;
}
.sparkols-act-feed-toolbar[hidden] {
  display: none !important;
}
.sparkols-act-timeline {
  padding: 6px 0 8px;
}
.sparkols-act-row {
  display: grid;
  grid-template-columns: 11px 1fr;
  gap: 12px;
  align-items: start;
  padding-bottom: 14px;
}
.sparkols-act-row:last-child {
  padding-bottom: 0;
}
.sparkols-act-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-top: 7px;
  flex-shrink: 0;
  background: #14b8a6;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.22);
}
.sparkols-act-dot--feedback {
  background: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.22);
}
.sparkols-act-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  color: #1e293b;
  line-height: 1.5;
}
.sparkols-act-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-bottom: 6px;
}
.sparkols-act-time {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
}
.sparkols-act-chip {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
}
.sparkols-act-chip--exec {
  color: #0f766e;
  background: #ccfbf1;
  border-color: #99f6e4;
}
.sparkols-act-chip--feedback {
  color: #b45309;
  background: #fffbeb;
  border-color: #fde68a;
}
.sparkols-act-who {
  font-weight: 600;
  color: #0f172a;
}
.sparkols-act-inf {
  color: #475569;
}
.sparkols-act-change {
  margin-top: 4px;
  font-size: 12px;
  color: #334155;
}
.sparkols-act-arrow {
  color: #94a3b8;
  padding: 0 4px;
}
.sparkols-act-val {
  font-weight: 600;
  color: #0f172a;
}
.sparkols-activity-list {
  margin: 0;
  padding-left: 18px;
  font-size: 12px;
  color: #334155;
  line-height: 1.55;
}
.sparkols-activity-item {
  margin-bottom: 6px;
}
.sparkols-activity-time {
  color: #64748b;
  font-size: 11px;
}
.sparkols-status-history-panel {
  max-width: 500px;
  width: 94vw;
  max-height: min(84vh, 680px);
  display: flex;
  flex-direction: column;
}
.sparkols-status-history-mount {
  flex: 1;
  min-height: 160px;
  max-height: min(58vh, 480px);
  overflow-y: auto;
  margin: 8px 0 12px;
}
.sparkols-status-history-list {
  margin: 0;
  padding-left: 18px;
  font-size: 12px;
  line-height: 1.5;
}
.sparkols-status-history-li {
  margin-bottom: 8px;
}

.sparkols-progress-audit-remark-panel {
  max-width: 520px;
  width: 94vw;
  max-height: min(84vh, 680px);
  display: flex;
  flex-direction: column;
}
.sparkols-progress-audit-remark-body {
  min-height: 0;
  max-height: min(54vh, 440px);
  overflow-y: auto;
  margin: 8px 0 12px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  color: #0f172a;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

/* Sparkols · 邮件页：状态条与发信任务状态色 */
.sparkols-mail-banner {
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.45;
}
.sparkols-mail-banner--ok {
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  color: #065f46;
}
.sparkols-mail-banner--warn {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  color: #92400e;
}
/* 邮件页主区域收窄；顶部提示不再套一层通栏大白 home-panel */
.sparkols-mail-layout {
  width: 100%;
}
.sparkols-mail-banner-slot {
  margin-bottom: 10px;
}
.sparkols-mail-banner-slot:empty {
  display: none;
}
.sparkols-mail-banner-slot > p.sparkols-muted {
  display: inline-block;
  margin: 0;
  padding: 8px 12px;
  font-size: 12px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px dashed #e2e8f0;
  max-width: 100%;
  box-sizing: border-box;
}
.sparkols-mail-dash {
  padding: 12px 14px !important;
}
.sparkols-mail-dash-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px 18px;
  margin-bottom: 10px;
}
.sparkols-mail-dash-intro {
  flex: 1;
  min-width: min(100%, 260px);
}
.sparkols-mail-dash-title {
  font-weight: 700;
  font-size: 15px;
  color: #0f172a;
  margin: 0 0 4px;
}
.sparkols-mail-dash-desc {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
}
.sparkols-mail-dash-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  flex-shrink: 0;
}
.sparkols-mail-dash-status {
  font-size: 12px;
}
.sparkols-mail-dash-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(96px, 1fr));
  gap: 10px;
  max-width: 820px;
  width: 100%;
  margin-bottom: 4px;
}
@media (max-width: 920px) {
  .sparkols-mail-dash-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: none;
  }
}
@media (max-width: 540px) {
  .sparkols-mail-dash-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: none;
  }
}
.sparkols-mail-kpi-tile {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 11px;
  background: linear-gradient(180deg, #fbfdff 0%, #f8fafc 100%);
  box-sizing: border-box;
  min-width: 0;
}
.sparkols-mail-kpi-l {
  font-size: 11px;
  color: #64748b;
  line-height: 1.3;
}
.sparkols-mail-kpi-v {
  margin-top: 4px;
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
}
.sparkols-mail-dash-detail {
  display: grid;
  grid-template-columns: minmax(280px, 1.4fr) minmax(240px, 1fr);
  gap: 12px;
  margin-top: 12px;
}
@media (max-width: 860px) {
  .sparkols-mail-dash-detail {
    grid-template-columns: 1fr;
  }
}
.sparkols-mail-detail-block {
  min-width: 0;
}
.sparkols-mail-detail-block--wide {
  grid-column: 1 / -1;
}
.sparkols-mail-detail-title {
  color: #334155;
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 6px;
}
.sparkols-mail-dash-bars {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
}
.sparkols-mail-dash-bars--compact {
  grid-template-columns: 1fr;
}
@media (max-width: 860px) {
  .sparkols-mail-dash-bars {
    grid-template-columns: 1fr;
  }
}
.sparkols-mail-bar-card {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  min-width: 0;
}
.sparkols-mail-bar-title {
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
}
.sparkols-mail-bar-row {
  display: grid;
  grid-template-columns: minmax(54px, 96px) minmax(80px, 1fr) 42px;
  gap: 8px;
  align-items: center;
  margin-top: 6px;
  color: #475569;
  font-size: 12px;
}
.sparkols-mail-bar-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sparkols-mail-bar-track {
  height: 7px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}
.sparkols-mail-bar-fill {
  height: 100%;
  border-radius: inherit;
  background: #2563eb;
}
.sparkols-mail-subtle {
  color: #64748b;
  font-size: 12px;
}
.sparkols-mail-dash-admin {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}
.sparkols-mail-st-ok {
  color: #15803d;
  font-weight: 600;
}
.sparkols-mail-st-fail {
  color: #b91c1c;
  font-weight: 600;
}
.sparkols-mail-st-pending {
  color: #b45309;
}
.sparkols-mail-st-warn {
  color: #b45309;
  font-weight: 600;
}

/* Sparkols 右侧内容区：覆盖 main.css 偏大按钮（云控制台 · 白底描边次要 / 蓝底主操作） */
.home-content .btn {
  padding: 5px 12px !important;
  font-size: 12px !important;
  line-height: 1.35;
  border-radius: 3px !important;
  font-weight: 400;
}
.home-content .btn-primary {
  background: #0052d9;
  color: #fff;
  border: 1px solid #0052d9;
}
.home-content .btn-primary:hover {
  background: #0046b8;
  border-color: #0046b8;
  color: #fff;
}
.home-content .btn-secondary {
  background: #fff !important;
  color: #333 !important;
  border: 1px solid #dcdcdc !important;
}
.home-content .btn-secondary:hover {
  background: #f5f5f5 !important;
  color: #111 !important;
  border-color: #bfbfbf !important;
}

/* 仅引入 home.css 的 Sparkols 壳页：与 login.css 一致，避免有 token 时整页跳转闪登录层 */
html.auth-token-cached #login-overlay {
  display: none !important;
}

/* Sparkols：内嵌「关键词运营」（/admin iframe） */
.sparkols-keyword-ops-wrap {
  height: calc(100vh - 118px);
  min-height: 420px;
  border-radius: 10px;
  overflow: hidden;
  background: #e2e8f0;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.35);
}
.sparkols-keyword-ops-iframe {
  width: 100%;
  height: 100%;
  min-height: 400px;
  border: 0;
  display: block;
  background: #f8fafc;
}
@media (max-width: 900px) {
  .sparkols-keyword-ops-wrap {
    height: calc(100vh - 108px);
    min-height: 360px;
  }
}

/* Sparkols 邮件页：BD 自动分发 + 筛选弹窗 */
.sparkols-mad-panel .sparkols-mad-title {
  font-weight: 700;
  font-size: 15px;
  color: #0f172a;
  margin-bottom: 4px;
}
.sparkols-mad-section {
  margin-top: 14px;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 13px;
  color: #334155;
}
.sparkols-mad-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 14px;
}

/* 分发页 · 执行情况：四指标 + 两列表并排 + 日志通栏 */
.sparkols-mad-status-details > summary.sparkols-mad-status-summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-weight: 700;
  font-size: 15px;
  color: #0f172a;
  list-style: none;
}
.sparkols-mad-status-details > summary.sparkols-mad-status-summary::-webkit-details-marker {
  display: none;
}
.sparkols-mad-status-summary-hint {
  font-size: 12px;
  font-weight: 400;
}
.sparkols-mad-status-panel {
  margin-top: 10px;
}
.sparkols-mad-status-intro {
  font-size: 12px;
  margin: 0 0 12px;
  line-height: 1.55;
}
.sparkols-mad-status-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
@media (max-width: 720px) {
  .sparkols-mad-status-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.sparkols-mad-status-kpi {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  background: linear-gradient(180deg, #fbfdff 0%, #f8fafc 100%);
  min-width: 0;
}
.sparkols-mad-status-kpi--wide {
  grid-column: span 1;
}
@media (max-width: 720px) {
  .sparkols-mad-status-kpi--wide {
    grid-column: span 2;
  }
}
.sparkols-mad-status-kpi-label {
  font-size: 11px;
  color: #64748b;
  line-height: 1.3;
}
.sparkols-mad-status-kpi-value {
  margin-top: 4px;
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}
.sparkols-mad-status-kpi-sub {
  font-size: 13px;
  font-weight: 600;
  word-break: break-word;
}
.sparkols-mad-status-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: 12px;
}
.sparkols-mad-status-line {
  font-size: 12px;
}
.sparkols-mad-status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 14px;
  align-items: start;
}
.sparkols-mad-status-card {
  min-width: 0;
  border: 1px solid #e8ecf1;
  border-radius: 10px;
  padding: 10px 12px 12px;
  background: #fff;
}
.sparkols-mad-status-card--full {
  grid-column: 1 / -1;
}
.sparkols-mad-status-card-title {
  font-weight: 600;
  font-size: 13px;
  color: #334155;
  margin-bottom: 8px;
}
.sparkols-mad-record-summary {
  margin: 10px 0 16px;
}
.sparkols-mad-record-block {
  min-width: 0;
  border: 1px solid #e8ecf1;
  border-radius: 10px;
  padding: 10px 12px 12px;
  background: #fff;
  margin-bottom: 12px;
}
.sparkols-mad-record-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}
.sparkols-mad-record-config {
  font-size: 12px;
  line-height: 1.6;
  color: #334155;
}
.sparkols-mad-record-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px 10px;
  margin-top: 12px;
}
.sparkols-mad-record-actions .sparkols-input {
  width: 120px;
}
.sparkols-mad-record-actions .sparkols-muted {
  line-height: 1.4;
}
.sparkols-mad-record-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.sparkols-mad-record-scroll {
  max-height: 360px;
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}
.sparkols-mad-record-scroll--runs {
  max-height: 420px;
}
.sparkols-mad-record-table {
  min-width: 0;
  table-layout: fixed;
}
.sparkols-mad-record-scroll--runs .sparkols-mad-record-table {
  min-width: 1120px;
}
.sparkols-mad-record-table--skipped {
  min-width: 980px;
}
.sparkols-mad-record-table th,
.sparkols-mad-record-table td {
  padding: 8px 10px;
  line-height: 1.35;
}
.sparkols-mad-record-table th {
  position: sticky;
  top: 0;
  z-index: 1;
}
.sparkols-mad-cell-platform,
.sparkols-mad-cell-id,
.sparkols-mad-cell-num,
.sparkols-mad-cell-time,
.sparkols-mad-cell-text,
.sparkols-mad-cell-email {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sparkols-mad-cell-platform {
  width: 84px;
  color: #64748b;
}
.sparkols-mad-cell-id {
  width: 78px;
  color: #64748b;
}
.sparkols-mad-cell-num {
  width: 68px;
  color: #334155;
  text-align: right !important;
}
.sparkols-mad-cell-time {
  width: 150px;
  color: #64748b;
}
.sparkols-mad-cell-email {
  max-width: 260px;
}
.sparkols-mad-record-more {
  margin-top: 6px;
  font-size: 12px;
  color: #64748b;
}
.sparkols-mad-record-warn {
  margin: 0 0 8px;
  padding: 8px 10px;
  border: 1px solid #fde68a;
  border-radius: 8px;
  background: #fffbeb;
  color: #92400e;
  font-size: 12px;
  line-height: 1.45;
}
@media (max-width: 900px) {
  .sparkols-mad-status-grid {
    grid-template-columns: 1fr;
  }
  .sparkols-mad-status-card--full {
    grid-column: 1;
  }
  .sparkols-mad-record-grid,
  .sparkols-mad-record-kpis {
    grid-template-columns: 1fr;
  }
}

.sparkols-modal {
  position: fixed;
  inset: 0;
  z-index: 5000;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}
.sparkols-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}
.sparkols-modal-card {
  position: relative;
  margin: 0;
  max-width: 720px;
  max-height: min(90vh, 760px);
  overflow: auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
  padding: 0;
  overflow: hidden;
}
.sparkols-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid #e2e8f0;
  font-weight: 600;
  color: #0f172a;
}
.sparkols-modal-close {
  border: none;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #64748b;
}
.sparkols-mad-filter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 18px;
  padding: 16px 18px;
  max-height: min(70vh, 520px);
  overflow: auto;
}
.sparkols-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 18px 16px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
}
.sparkols-inf-add-card {
  width: min(680px, calc(100vw - 32px));
}
.sparkols-inf-add-body {
  padding: 16px 18px;
}
.sparkols-inf-add-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
}
.sparkols-inf-add-grid label {
  min-width: 0;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}
.sparkols-inf-add-grid .sparkols-input {
  width: 100%;
  margin-top: 5px;
}
.sparkols-inf-add-span2 {
  grid-column: 1 / -1;
}
.sparkols-inf-add-batch {
  margin-top: 14px;
  border-top: 1px solid #e2e8f0;
  padding-top: 12px;
}
.sparkols-inf-add-batch summary {
  cursor: pointer;
  font-weight: 700;
  color: #0f172a;
}
.sparkols-inf-add-batch textarea {
  width: 100%;
  min-height: 96px;
  margin-top: 8px;
  box-sizing: border-box;
}
.sparkols-inf-add-batch .sparkols-btn {
  margin-top: 8px;
}
@media (max-width: 640px) {
  .sparkols-inf-add-grid {
    grid-template-columns: 1fr;
  }
  .sparkols-inf-add-span2 {
    grid-column: auto;
  }
}

.sparkols-analysis-form {
  align-items: center;
}
.sparkols-analysis-account-head {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}
.sparkols-analysis-account-head img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
}
.sparkols-analysis-account-name {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 4px;
}
.sparkols-analysis-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.9fr);
  gap: 12px;
  align-items: start;
}
.sparkols-analysis-history-panel--full {
  max-width: none;
}
.sparkols-analysis-history-list {
  display: grid;
  gap: 10px;
}
.sparkols-analysis-history-skeleton-list {
  display: grid;
  gap: 10px;
}
.sparkols-analysis-history-skeleton {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 78px 108px 150px;
  gap: 12px;
  align-items: center;
  min-height: 58px;
  padding: 14px 16px;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #fff;
}
.sparkols-analysis-history-skeleton .sparkols-page-skeleton-line.is-title,
.sparkols-analysis-history-skeleton .sparkols-page-skeleton-line.is-wide {
  grid-column: 1;
}
.sparkols-analysis-history-skeleton .sparkols-page-skeleton-line.is-title {
  align-self: end;
}
.sparkols-analysis-history-skeleton .sparkols-page-skeleton-line.is-wide {
  width: min(72%, 360px);
  align-self: start;
}
.sparkols-analysis-history-skeleton .sparkols-page-skeleton-pill,
.sparkols-analysis-history-skeleton .sparkols-page-skeleton-line.is-short,
.sparkols-analysis-history-skeleton .sparkols-page-skeleton-line.is-mid {
  grid-row: 1 / span 2;
  align-self: center;
}
.sparkols-analysis-history-skeleton .sparkols-page-skeleton-pill {
  grid-column: 2;
  justify-self: center;
  width: 78px;
}
.sparkols-analysis-history-skeleton .sparkols-page-skeleton-line.is-short {
  grid-column: 3;
  width: 108px;
}
.sparkols-analysis-history-skeleton .sparkols-page-skeleton-line.is-mid {
  grid-column: 4;
  width: 150px;
}
.sparkols-analysis-history-item {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, auto);
  gap: 18px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  color: inherit;
}
.sparkols-analysis-history-item:hover {
  border-color: #93c5fd;
  background: #f8fbff;
}
.sparkols-analysis-history-item.is-loading {
  opacity: 0.62;
  pointer-events: none;
}
.sparkols-analysis-history-title {
  color: #0f172a;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.sparkols-analysis-history-summary {
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sparkols-analysis-history-side {
  display: grid;
  grid-template-columns: 78px 108px 88px 150px;
  gap: 10px;
  align-items: center;
  color: #64748b;
  font-size: 12px;
  white-space: nowrap;
}
.sparkols-analysis-history-side strong {
  font-size: 13px;
  font-weight: 800;
}
.sparkols-analysis-history-platform {
  display: inline-flex;
  justify-content: center;
  padding: 3px 8px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  color: #1d4ed8;
  background: #eff6ff;
  font-weight: 800;
}
@media (max-width: 760px) {
  .sparkols-analysis-history-skeleton {
    grid-template-columns: minmax(0, 1fr);
  }
  .sparkols-analysis-history-skeleton .sparkols-page-skeleton-line.is-title,
  .sparkols-analysis-history-skeleton .sparkols-page-skeleton-line.is-wide,
  .sparkols-analysis-history-skeleton .sparkols-page-skeleton-pill,
  .sparkols-analysis-history-skeleton .sparkols-page-skeleton-line.is-short,
  .sparkols-analysis-history-skeleton .sparkols-page-skeleton-line.is-mid {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
  }
}
.sparkols-analysis-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 5200;
  display: flex;
  justify-content: flex-end;
  background: rgba(15, 23, 42, 0.32);
}
.sparkols-analysis-drawer-panel {
  flex: 0 0 min(820px, calc(100vw - 28px));
  width: min(820px, calc(100vw - 28px));
  height: 100dvh;
  background: #f8fafc;
  box-shadow: -18px 0 42px rgba(15, 23, 42, 0.2);
  overflow-y: auto;
  color: #0f172a;
  animation: sparkols-progress-drawer-in 160ms ease-out;
}
.sparkols-analysis-drawer-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid #dbe4ef;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
}
.sparkols-analysis-drawer-head h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.sparkols-analysis-drawer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 9px;
  color: #64748b;
  font-size: 12px;
}
.sparkols-analysis-drawer-meta span {
  padding: 3px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
}
.sparkols-analysis-drawer-body {
  padding: 14px 18px 22px;
}
.sparkols-analysis-drawer-body .sparkols-analysis-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.sparkols-analysis-drawer-body .sparkols-analysis-profile-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.sparkols-analysis-drawer-body .sparkols-analysis-charts {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.sparkols-analysis-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.sparkols-analysis-summary > div {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px 12px;
  background: #f8fafc;
  min-width: 0;
}
.sparkols-analysis-summary span,
.sparkols-analysis-summary strong {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sparkols-analysis-ai-hero {
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: linear-gradient(180deg, #eff6ff 0%, #ffffff 100%);
  padding: 14px 16px;
  margin: 10px 0 12px;
}
.sparkols-analysis-ai-hero--empty {
  border-color: #e5e7eb;
  background: #f8fafc;
}
.sparkols-analysis-ai-title {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 6px;
}
.sparkols-analysis-ai-hero p {
  margin: 0;
  line-height: 1.65;
  color: #334155;
}
.sparkols-analysis-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.sparkols-analysis-tags span {
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #ffffff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 9px;
}
.sparkols-analysis-profile-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.sparkols-analysis-profile-card {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
  min-width: 0;
}
.sparkols-analysis-profile-card--wide {
  grid-column: span 2;
}
.sparkols-analysis-profile-card span {
  display: block;
  color: #64748b;
  font-size: 12px;
  margin-bottom: 5px;
}
.sparkols-analysis-profile-card strong {
  display: block;
  color: #0f172a;
  font-size: 13px;
  line-height: 1.45;
  word-break: break-word;
}
.sparkols-analysis-charts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 0 16px;
}
.sparkols-analysis-charts--ai {
  margin-top: 6px;
}
.sparkols-analysis-chart-card {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  min-width: 0;
}
.sparkols-analysis-chart-title {
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 10px;
}
.sparkols-analysis-bar-row {
  margin-top: 9px;
}
.sparkols-analysis-bar-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: #475569;
}
.sparkols-analysis-bar-head span,
.sparkols-analysis-bar-head strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sparkols-analysis-bar-head strong {
  color: #0f172a;
  font-weight: 700;
  flex: 0 0 auto;
}
.sparkols-analysis-bar-track {
  height: 8px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
  margin-top: 5px;
}
.sparkols-analysis-bar-fill {
  height: 100%;
  border-radius: inherit;
  background: #2563eb;
}
.sparkols-analysis-bar-fill--region {
  background: #0f766e;
}
.sparkols-analysis-bar-fill--good {
  background: #16a34a;
}
.sparkols-analysis-bar-fill--warn {
  background: #d97706;
}
.sparkols-analysis-bar-fill--bad {
  background: #dc2626;
}
.sparkols-analysis-aiq {
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #f8fbff;
  padding: 10px;
  margin-bottom: 10px;
}
.sparkols-analysis-aiq > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.sparkols-analysis-aiq span {
  color: #475569;
  font-size: 12px;
}
.sparkols-analysis-aiq strong {
  white-space: nowrap;
}
.sparkols-analysis-aiq p {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: #334155;
}
.sparkols-analysis-mini-list {
  margin: 0;
  padding-left: 18px;
  color: #334155;
  font-size: 12px;
  line-height: 1.55;
}
.sparkols-analysis-mini-list li {
  margin: 3px 0;
}
.sparkols-analysis-subtitle {
  margin: 10px 0 5px;
  font-size: 12px;
  font-weight: 800;
  color: #475569;
}
.sparkols-analysis-note {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
  color: #334155;
}
.sparkols-analysis-section-head {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  margin: 18px 0 10px;
}
.sparkols-analysis-hot-video {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 14px;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: #f8fbff;
  padding: 12px;
  margin-bottom: 12px;
}
.sparkols-analysis-hot-media {
  min-width: 0;
}
.sparkols-analysis-hot-kicker {
  color: #2563eb;
  font-weight: 800;
  font-size: 12px;
  margin-bottom: 4px;
}
.sparkols-analysis-hot-video h4 {
  margin: 0 0 8px;
  color: #0f172a;
}
.sparkols-analysis-hot-video p {
  margin: 6px 0;
  color: #334155;
  line-height: 1.55;
}
.sparkols-analysis-hot-risk {
  color: #b45309 !important;
}
.sparkols-analysis-video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.sparkols-analysis-video-card {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  padding: 10px;
  min-width: 0;
}
.sparkols-analysis-video-preview {
  display: block;
  min-width: 0;
  text-decoration: none;
}
.sparkols-analysis-video-media {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 220px;
  object-fit: cover;
  border-radius: 8px;
  background: #e5e7eb;
}
.sparkols-analysis-video-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: 8px;
  background: #e5e7eb;
  color: #64748b;
  font-size: 12px;
}
.sparkols-analysis-video-title {
  font-weight: 800;
  color: #0f172a;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sparkols-analysis-video-stats,
.sparkols-analysis-video-link {
  margin-top: 6px;
  font-size: 12px;
  color: #64748b;
}
.sparkols-analysis-video-link {
  display: inline-block;
  color: #2563eb;
  text-decoration: none;
  font-weight: 700;
}
.sparkols-analysis-video-ai {
  margin-top: 8px;
  border-top: 1px solid #e5e7eb;
  padding-top: 8px;
}
.sparkols-analysis-video-ai strong {
  display: block;
  font-size: 12px;
  color: #334155;
  margin-bottom: 4px;
}
.sparkols-analysis-video-ai p {
  margin: 3px 0;
  font-size: 12px;
  color: #475569;
  line-height: 1.5;
}
.sparkols-analysis-history-table th,
.sparkols-analysis-history-table td {
  white-space: nowrap;
}
.sparkols-analysis-history-table th:nth-child(4),
.sparkols-analysis-history-table td:nth-child(4) {
  min-width: 96px;
}
.sparkols-analysis-markdown h3 {
  margin: 0 0 10px;
  color: #111827;
}
.sparkols-analysis-markdown h4 {
  margin: 14px 0 6px;
  color: #334155;
}
.sparkols-analysis-markdown ul {
  margin: 0 0 6px 18px;
  padding: 0;
}
.sparkols-analysis-markdown li {
  margin: 4px 0;
}
.sparkols-analysis-risk-low {
  color: #047857;
}
.sparkols-analysis-risk-mid {
  color: #b45309;
}
.sparkols-analysis-risk-high {
  color: #b91c1c;
}
@media (max-width: 1050px) {
  .sparkols-analysis-grid,
  .sparkols-analysis-summary,
  .sparkols-analysis-profile-grid,
  .sparkols-analysis-charts,
  .sparkols-analysis-hot-video,
  .sparkols-analysis-video-grid,
  .sparkols-analysis-video-card {
    grid-template-columns: 1fr;
  }
  .sparkols-analysis-profile-card--wide {
    grid-column: span 1;
  }
  .sparkols-analysis-history-item {
    grid-template-columns: minmax(0, 1fr);
  }
  .sparkols-analysis-history-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    white-space: normal;
  }
  .sparkols-analysis-drawer-panel {
    flex-basis: min(94vw, 820px);
    width: min(94vw, 820px);
  }
  .sparkols-analysis-drawer-body .sparkols-analysis-summary,
  .sparkols-analysis-drawer-body .sparkols-analysis-profile-grid,
  .sparkols-analysis-drawer-body .sparkols-analysis-charts {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Customer-facing portal shell: visually separated from the internal Sparkols admin UI. */
body.sparkols-customer-mode {
  background: #eef4f7;
}
body.sparkols-customer-mode #main-container.home-shell {
  background: radial-gradient(circle at 18% 0%, rgba(78, 161, 151, 0.16), transparent 34%), #eef4f7;
}
body.sparkols-customer-mode #main-container.home-shell {
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}
body.sparkols-customer-mode .home-sidebar,
body.sparkols-customer-mode .home-topbar {
  display: none !important;
}
body.sparkols-customer-mode #main-container.home-shell > .home-content {
  align-items: stretch;
  padding: 0;
  background: transparent;
  height: 100vh;
  max-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto !important;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
}
body.sparkols-customer-mode #main-container.home-shell > .home-content > * {
  max-width: none;
}
.sparkols-customer-portal {
  width: 100%;
  min-height: 100vh;
  padding: 34px clamp(18px, 4vw, 58px) 46px;
  box-sizing: border-box;
  color: #102225;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.customer-portal-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 26px;
  padding: 30px;
  border: 1px solid rgba(31, 76, 77, 0.12);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(236, 247, 246, 0.92));
  box-shadow: 0 24px 60px rgba(29, 55, 61, 0.12);
  border-radius: 18px;
}
.customer-portal-brand {
  color: #16746d;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.customer-portal-hero h1 {
  margin: 8px 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: 0;
  color: #0d1f22;
}
.customer-portal-hero p {
  margin: 0;
  color: #5d7076;
  font-size: 15px;
  line-height: 1.7;
}
.customer-portal-projects {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  color: #244247;
  font-size: 13px;
}
.customer-portal-projects span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(22, 116, 109, 0.1);
  color: #12635f;
  border: 1px solid rgba(22, 116, 109, 0.12);
  font-weight: 700;
}
.customer-portal-userbox {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  color: #496169;
  font-size: 13px;
  min-width: 210px;
}
.customer-portal-ghost-btn,
.customer-portal-settings-controls button,
.customer-portal-primary,
.customer-portal-secondary,
.customer-portal-danger {
  appearance: none;
  border: 0;
  border-radius: 10px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
}
.customer-portal-ghost-btn {
  padding: 9px 13px;
  border: 1px solid rgba(16, 34, 37, 0.13);
  background: rgba(255, 255, 255, 0.7);
  color: #213c42;
}
.customer-portal-ghost-btn:hover,
.customer-portal-settings-controls button:hover,
.customer-portal-primary:hover,
.customer-portal-secondary:hover,
.customer-portal-danger:hover {
  transform: translateY(-1px);
}
.customer-portal-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}
.customer-portal-tab {
  border: 1px solid rgba(31, 76, 77, 0.12);
  background: rgba(255, 255, 255, 0.72);
  color: #36545a;
  min-height: 58px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 850;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  padding: 14px 16px;
  box-shadow: 0 10px 28px rgba(29, 55, 61, 0.06);
}
.customer-portal-tab span {
  float: right;
  min-width: 28px;
  text-align: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(31, 76, 77, 0.08);
  color: #16746d;
}
.customer-portal-tab.active {
  background: #102f32;
  color: #fff;
  border-color: #102f32;
  box-shadow: 0 18px 38px rgba(16, 47, 50, 0.2);
}
.customer-portal-tab.active span {
  background: rgba(255, 255, 255, 0.18);
  color: #e9fffb;
}
.customer-portal-settings {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 18px 20px;
  margin-bottom: 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(31, 76, 77, 0.1);
}
.customer-portal-settings-title {
  font-size: 16px;
  font-weight: 900;
  color: #142b30;
}
.customer-portal-settings p {
  margin: 3px 0 0;
  color: #6b7e84;
  font-size: 13px;
}
.customer-portal-settings-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}
.customer-portal-settings-controls label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #304b51;
  font-size: 13px;
  font-weight: 750;
}
.customer-portal-settings-controls input[type='checkbox'] {
  width: 16px;
  height: 16px;
  accent-color: #14736d;
}
.customer-portal-settings-controls select {
  height: 38px;
  min-width: 112px;
  border-radius: 10px;
  border: 1px solid rgba(31, 76, 77, 0.16);
  background: #fff;
  color: #172f34;
  font-family: inherit;
  font-size: 13px;
  font-weight: 750;
  padding: 0 10px;
}
.customer-portal-settings-controls button {
  height: 38px;
  padding: 0 15px;
  background: #14736d;
  color: #fff;
  box-shadow: 0 10px 20px rgba(20, 115, 109, 0.18);
}
.customer-portal-stage {
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(31, 76, 77, 0.1);
  box-shadow: 0 20px 58px rgba(29, 55, 61, 0.08);
  padding: 24px;
}
.customer-portal-panel {
  display: none;
}
.customer-portal-panel.active {
  display: block;
}
.customer-portal-panel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(31, 76, 77, 0.1);
}
.customer-portal-panel-head h2 {
  margin: 0;
  color: #102225;
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: 0;
}
.customer-portal-panel-head p {
  margin: 0;
  color: #708287;
  font-size: 13px;
}
.customer-portal-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 14px;
}
.customer-portal-card {
  border: 1px solid rgba(31, 76, 77, 0.1);
  background: #fff;
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 14px 30px rgba(29, 55, 61, 0.07);
}
.customer-portal-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.customer-portal-card-project {
  color: #102225;
  font-size: 17px;
  font-weight: 900;
}
.customer-portal-card-meta {
  margin-top: 3px;
  color: #8a9ba0;
  font-size: 12px;
  font-weight: 750;
}
.customer-portal-fields {
  display: grid;
  gap: 9px;
}
.customer-portal-field {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  font-size: 14px;
}
.customer-portal-field-label {
  color: #71858a;
  font-weight: 850;
}
.customer-portal-field-value {
  color: #172f34;
  font-weight: 750;
  min-width: 0;
  overflow-wrap: anywhere;
}
.customer-portal-field-value a {
  color: #13746e;
  font-weight: 900;
}
.customer-portal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(31, 76, 77, 0.09);
}
.customer-portal-primary,
.customer-portal-secondary,
.customer-portal-danger {
  min-height: 36px;
  padding: 8px 13px;
}
.customer-portal-primary {
  background: #14736d;
  color: #fff;
}
.customer-portal-secondary {
  background: #edf6f5;
  color: #12635f;
  border: 1px solid rgba(18, 99, 95, 0.14);
}
.customer-portal-danger {
  background: #fff1f0;
  color: #b42318;
  border: 1px solid rgba(180, 35, 24, 0.16);
}
.customer-portal-feedback {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f1f8f6;
  color: #176861;
  font-size: 13px;
  font-weight: 800;
}
.customer-portal-empty {
  grid-column: 1 / -1;
  min-height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed rgba(31, 76, 77, 0.2);
  border-radius: 14px;
  color: #74878c;
  background: rgba(255, 255, 255, 0.52);
  font-weight: 750;
}
@media (max-width: 760px) {
  .sparkols-customer-portal {
    padding: 18px 14px 28px;
  }
  .customer-portal-hero,
  .customer-portal-settings,
  .customer-portal-panel-head {
    flex-direction: column;
    align-items: stretch;
  }
  .customer-portal-userbox,
  .customer-portal-settings-controls {
    justify-content: flex-start;
  }
  .customer-portal-tabs {
    grid-template-columns: 1fr 1fr;
  }
  .customer-portal-stage {
    padding: 16px;
  }
  .customer-portal-list {
    grid-template-columns: 1fr;
  }
  .customer-portal-field {
    grid-template-columns: 82px minmax(0, 1fr);
  }
}

/* High-end client portal refresh. Keep this block after the legacy customer shell styles. */
body.sparkols-customer-mode {
  background:
    linear-gradient(135deg, rgba(232, 249, 248, 0.9), rgba(248, 252, 255, 0.96) 42%, rgba(241, 248, 250, 0.92)),
    #f3f8fa;
}
body.sparkols-customer-mode #main-container.home-shell {
  background:
    linear-gradient(115deg, rgba(22, 145, 135, 0.1), transparent 34%),
    linear-gradient(180deg, #f7fcfd 0%, #eef7f8 100%);
}
.sparkols-customer-portal {
  position: relative;
  overflow: visible;
  padding: 26px clamp(18px, 2.8vw, 52px) 34px;
}
.sparkols-customer-portal::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 255px;
  pointer-events: none;
  background:
    repeating-linear-gradient(145deg, rgba(20, 128, 120, 0.075) 0 1px, transparent 1px 11px);
  mask-image: linear-gradient(90deg, #000 0%, rgba(0, 0, 0, 0.45) 48%, transparent 76%);
}
.customer-portal-window-dots {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 9px;
  margin: 0 0 2px;
}
.customer-portal-window-dots span {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(16, 34, 37, 0.08);
}
.customer-portal-window-dots span:nth-child(1) {
  background: #ff5f57;
}
.customer-portal-window-dots span:nth-child(2) {
  background: #ffbd2e;
}
.customer-portal-window-dots span:nth-child(3) {
  background: #28c840;
}
.customer-portal-hero {
  position: relative;
  z-index: 1;
  padding: 16px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.customer-portal-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: #0f726d;
  font-size: 21px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: none;
}
.customer-portal-logo {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 34px;
  border-radius: 11px;
  color: #fff;
  font-size: 26px;
  font-weight: 950;
  line-height: 1;
  background: linear-gradient(135deg, #35c6bb, #0f7d76);
  box-shadow: 0 12px 26px rgba(18, 122, 114, 0.18);
}
.customer-portal-hero h1 {
  margin: 34px 0 10px;
  max-width: 720px;
  font-size: clamp(36px, 4.3vw, 58px);
  font-weight: 950;
  color: #132539;
}
.customer-portal-hero p {
  color: #50647a;
  font-size: 17px;
  font-weight: 750;
}
.customer-portal-projects {
  margin-top: 22px;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 800;
}
.customer-portal-projects::before {
  content: "绑定项目";
  color: #33485b;
  margin-right: 4px;
}
.customer-portal-projects span {
  min-height: 34px;
  padding: 5px 20px;
  border-radius: 999px;
  background: #dff5f4;
  color: #243f4f;
  border-color: rgba(19, 123, 116, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}
.customer-portal-userbox {
  min-width: 470px;
  gap: 14px;
}
.customer-portal-user-pill,
.customer-portal-ghost-btn {
  min-height: 58px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(58, 104, 119, 0.12);
  box-shadow: 0 14px 32px rgba(29, 55, 61, 0.1);
  backdrop-filter: blur(14px);
}
.customer-portal-user-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  color: #1c3448;
  font-size: 18px;
  font-weight: 850;
}
.customer-portal-user-icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  background: #0c8179;
  font-size: 22px;
}
.customer-portal-caret {
  color: #8090a0;
  font-size: 18px;
}
.customer-portal-ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 24px;
  color: #0f726d;
  font-size: 17px;
}
.customer-portal-tabs {
  position: relative;
  z-index: 1;
  gap: 18px;
  margin: 30px 0 22px;
}
.customer-portal-tab {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) 58px;
  align-items: center;
  gap: 16px;
  min-height: 138px;
  padding: 26px 28px;
  border-radius: 15px;
  border-color: rgba(58, 104, 119, 0.1);
  background: rgba(255, 255, 255, 0.86);
  color: #1b3146;
  box-shadow: 0 16px 38px rgba(35, 62, 72, 0.08);
}
.customer-portal-tab span {
  float: none;
  min-width: 0;
  padding: 0;
  text-align: inherit;
  border-radius: 0;
  background: transparent;
  color: inherit;
}
.customer-portal-tab-icon {
  display: grid !important;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 18px !important;
  background: #e7f8f7 !important;
  color: #0f8179 !important;
  font-size: 28px;
}
.customer-portal-tab-text {
  display: grid;
  gap: 4px;
}
.customer-portal-tab-text strong {
  font-size: 24px;
  line-height: 1.1;
  font-weight: 950;
}
.customer-portal-tab-text em {
  color: #6b7c91;
  font-size: 15px;
  font-style: normal;
  font-weight: 800;
}
.customer-portal-tab-count {
  display: grid !important;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50% !important;
  background: #e3f7f6 !important;
  color: #0e817a !important;
  font-size: 28px;
  font-weight: 950;
}
.customer-portal-tab.active {
  background: linear-gradient(135deg, #12958d, #056a65);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 20px 42px rgba(12, 117, 110, 0.24);
}
.customer-portal-tab.active .customer-portal-tab-icon {
  background: rgba(255, 255, 255, 0.86) !important;
  color: #0e817a !important;
}
.customer-portal-tab.active .customer-portal-tab-text em {
  color: rgba(255, 255, 255, 0.84);
}
.customer-portal-tab.active .customer-portal-tab-count {
  background: #fff !important;
  color: #0e817a !important;
}
.customer-portal-settings {
  position: relative;
  z-index: 1;
  padding: 26px 28px;
  margin-bottom: 24px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(58, 104, 119, 0.09);
  box-shadow: 0 16px 38px rgba(35, 62, 72, 0.08);
}
.customer-portal-settings > div:first-child {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  column-gap: 18px;
  align-items: center;
}
.customer-portal-settings-icon {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: #e7f8f7;
  color: #0e817a;
  font-size: 30px;
}
.customer-portal-settings-title {
  font-size: 24px;
  color: #17283b;
}
.customer-portal-settings p {
  font-size: 14px;
  font-weight: 750;
}
.customer-switch {
  gap: 10px !important;
  font-size: 17px !important;
  color: #26394d !important;
}
.customer-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.customer-switch span {
  position: relative;
  display: inline-block;
  width: 54px;
  height: 30px;
  border-radius: 999px;
  background: #c9d9dd;
  box-shadow: inset 0 0 0 1px rgba(31, 76, 77, 0.08);
  transition: background 0.14s ease;
}
.customer-switch span::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 8px rgba(16, 34, 37, 0.18);
  transition: transform 0.14s ease;
}
.customer-switch input:checked + span {
  background: #0e817a;
}
.customer-switch input:checked + span::after {
  transform: translateX(24px);
}
.customer-portal-settings-controls select,
.customer-portal-settings-controls button {
  height: 56px;
  border-radius: 12px;
  font-size: 18px;
}
.customer-portal-settings-controls select {
  min-width: 230px;
  padding: 0 20px;
}
.customer-portal-settings-controls button {
  min-width: 190px;
  background: linear-gradient(135deg, #11958d, #08746d);
}
.customer-portal-stage {
  position: relative;
  z-index: 1;
  padding: 28px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(58, 104, 119, 0.09);
  box-shadow: 0 18px 44px rgba(35, 62, 72, 0.08);
}
.customer-portal-panel-head {
  display: block;
  margin-bottom: 22px;
  padding: 0;
  border: 0;
}
.customer-portal-panel-head h2 {
  font-size: 28px;
  font-weight: 950;
  color: #15273b;
}
.customer-portal-panel-head p {
  margin-top: 6px;
  color: #6b7c91;
  font-size: 15px;
  font-weight: 750;
}
.customer-portal-list {
  grid-template-columns: repeat(4, minmax(250px, 1fr));
  gap: 26px;
}
.customer-portal-card {
  min-height: 430px;
  border-radius: 14px;
  padding: 24px 24px 20px;
  border-color: rgba(58, 104, 119, 0.12);
  box-shadow: 0 16px 34px rgba(35, 62, 72, 0.09);
}
.customer-portal-card-titleline {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: #26394d;
  font-size: 16px;
}
.customer-portal-card-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #f0f7f8;
  color: #26394d;
  font-size: 18px;
}
.customer-portal-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 13px;
  border-radius: 999px;
  background: #e7f8f7;
  color: #0e817a;
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}
.customer-portal-fields {
  gap: 8px;
}
.customer-portal-field {
  grid-template-columns: 96px minmax(0, 1fr);
  font-size: 15px;
}
.customer-portal-actions {
  gap: 18px;
  margin-top: 28px;
  padding-top: 20px;
}
.customer-portal-primary,
.customer-portal-secondary,
.customer-portal-danger {
  min-height: 52px;
  border-radius: 10px;
  padding: 0 25px;
  font-size: 18px;
}
.customer-portal-danger {
  background: #fff;
  color: #ef5d5d;
  border-color: rgba(239, 93, 93, 0.58);
}
.customer-portal-empty-card {
  grid-column: auto;
  min-height: 430px;
  flex-direction: column;
  gap: 22px;
  border-color: rgba(46, 181, 176, 0.24);
  background: rgba(255, 255, 255, 0.58);
  color: #94a4b3;
  font-size: 17px;
}
.customer-portal-empty-icon {
  display: grid;
  place-items: center;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: #e7f8f7;
  color: #37b7af;
  font-size: 42px;
}
@media (max-width: 1280px) {
  .customer-portal-list {
    grid-template-columns: repeat(2, minmax(280px, 1fr));
  }
  .customer-portal-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 860px) {
  .customer-portal-userbox {
    min-width: 0;
    justify-content: flex-start;
  }
  .customer-portal-tab {
    grid-template-columns: 58px minmax(0, 1fr) 46px;
    min-height: 116px;
    padding: 20px;
  }
  .customer-portal-settings > div:first-child {
    grid-template-columns: 52px minmax(0, 1fr);
  }
  .customer-portal-settings-controls select,
  .customer-portal-settings-controls button {
    width: 100%;
    min-width: 0;
  }
}
@media (max-width: 620px) {
  .customer-portal-tabs,
  .customer-portal-list {
    grid-template-columns: 1fr;
  }
  .customer-portal-card,
  .customer-portal-empty-card {
    min-height: auto;
  }
}

/* Customer portal screen-fit pass: keep the approved visual style usable on 13-16" screens. */
.sparkols-customer-portal {
  max-width: 1920px;
  margin: 0 auto;
  padding: clamp(16px, 2vh, 24px) clamp(18px, 3vw, 46px) 28px;
}
.customer-portal-window-dots {
  margin-bottom: clamp(10px, 1.5vh, 22px);
}
.customer-portal-hero {
  align-items: flex-start;
}
.customer-portal-brand {
  font-size: clamp(17px, 1.25vw, 22px);
}
.customer-portal-logo {
  width: clamp(38px, 2.7vw, 50px);
  height: clamp(32px, 2.4vw, 42px);
  font-size: clamp(23px, 1.8vw, 30px);
}
.customer-portal-hero h1 {
  margin: clamp(22px, 3vh, 36px) 0 8px;
  font-size: clamp(38px, 4.4vw, 70px);
}
.customer-portal-hero p {
  font-size: clamp(15px, 1.08vw, 20px);
}
.customer-portal-projects {
  margin-top: clamp(16px, 2.3vh, 26px);
}
.customer-portal-userbox {
  min-width: min(34vw, 520px);
}
.customer-portal-user-pill,
.customer-portal-ghost-btn {
  min-height: clamp(46px, 5.3vh, 58px);
}
.customer-portal-user-pill {
  font-size: clamp(15px, 1.2vw, 19px);
}
.customer-portal-ghost-btn {
  padding: 0 clamp(16px, 1.5vw, 24px);
  font-size: clamp(15px, 1.1vw, 18px);
}
.customer-portal-tabs {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 1.35vw, 22px);
  margin: clamp(22px, 3vh, 34px) 0 clamp(16px, 2.4vh, 24px);
}
.customer-portal-tab {
  grid-template-columns: clamp(48px, 4.1vw, 70px) minmax(0, 1fr) clamp(44px, 3.8vw, 58px);
  min-height: clamp(96px, 13vh, 128px);
  padding: clamp(18px, 2vw, 28px);
}
.customer-portal-tab-icon {
  width: clamp(46px, 4vw, 58px);
  height: clamp(46px, 4vw, 58px);
  font-size: clamp(22px, 1.8vw, 28px);
}
.customer-portal-tab-text,
.customer-portal-tab.active .customer-portal-tab-text,
.customer-portal-tab.active .customer-portal-tab-text strong,
.customer-portal-tab.active .customer-portal-tab-text em {
  background: transparent !important;
}
.customer-portal-tab-text strong {
  font-size: clamp(19px, 1.75vw, 27px);
}
.customer-portal-tab-text em {
  font-size: clamp(13px, 0.95vw, 16px);
}
.customer-portal-tab-count {
  width: clamp(44px, 3.8vw, 56px);
  height: clamp(44px, 3.8vw, 56px);
  font-size: clamp(22px, 1.9vw, 30px);
}
.customer-portal-settings {
  padding: clamp(16px, 2vh, 24px) clamp(18px, 2vw, 28px);
  margin-bottom: clamp(18px, 2.4vh, 26px);
}
.customer-portal-settings-icon {
  width: clamp(48px, 4vw, 60px);
  height: clamp(48px, 4vw, 60px);
  font-size: clamp(24px, 1.8vw, 30px);
}
.customer-portal-settings-title {
  font-size: clamp(20px, 1.55vw, 26px);
}
.customer-switch {
  font-size: clamp(14px, 1vw, 17px) !important;
}
.customer-switch span {
  width: 50px;
  height: 28px;
}
.customer-switch span::after {
  width: 20px;
  height: 20px;
}
.customer-switch input:checked + span::after {
  transform: translateX(22px);
}
.customer-portal-settings-controls {
  gap: clamp(8px, 1vw, 14px);
}
.customer-portal-settings-controls select,
.customer-portal-settings-controls button {
  height: clamp(44px, 5vh, 54px);
  font-size: clamp(15px, 1.1vw, 18px);
}
.customer-portal-settings-controls select {
  min-width: clamp(160px, 15vw, 230px);
}
.customer-portal-settings-controls button {
  min-width: clamp(140px, 13vw, 190px);
}
.customer-portal-stage {
  padding: clamp(18px, 2.2vw, 28px);
}
.customer-portal-panel-head {
  margin-bottom: clamp(14px, 1.8vh, 22px);
}
.customer-portal-panel-head h2 {
  font-size: clamp(24px, 2vw, 32px);
}
.customer-portal-list {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(16px, 1.7vw, 26px);
}
.customer-portal-card,
.customer-portal-empty-card {
  min-height: min(430px, 42vh);
}
@media (max-height: 860px) and (min-width: 1000px) {
  .sparkols-customer-portal {
    padding-top: 14px;
  }
  .customer-portal-window-dots {
    margin-bottom: 8px;
  }
  .customer-portal-hero h1 {
    margin-top: 18px;
    font-size: clamp(34px, 3.6vw, 54px);
  }
  .customer-portal-projects {
    margin-top: 12px;
  }
  .customer-portal-tabs {
    margin: 18px 0 14px;
  }
  .customer-portal-tab {
    min-height: 92px;
  }
  .customer-portal-settings {
    margin-bottom: 16px;
  }
}
@media (max-width: 1120px) {
  .customer-portal-hero {
    flex-direction: column;
  }
  .customer-portal-userbox {
    min-width: 0;
    justify-content: flex-start;
  }
  .customer-portal-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .customer-portal-settings {
    flex-direction: column;
    align-items: stretch;
  }
  .customer-portal-settings-controls {
    justify-content: flex-start;
  }
}
@media (max-width: 720px) {
  .customer-portal-tabs {
    grid-template-columns: 1fr;
  }
  .customer-portal-tab {
    min-height: 86px;
  }
}

/* Customer portal compact density pass: this is a workbench, not a poster. */
.sparkols-customer-portal {
  padding: clamp(10px, 1.5vh, 18px) clamp(18px, 2.6vw, 34px) 22px;
}
.sparkols-customer-portal::before {
  height: 210px;
}
.customer-portal-window-dots {
  gap: 7px;
  margin-bottom: 8px;
}
.customer-portal-window-dots span {
  width: 12px;
  height: 12px;
}
.customer-portal-brand {
  gap: 10px;
  font-size: clamp(15px, 1vw, 18px);
}
.customer-portal-logo {
  width: 34px;
  height: 30px;
  border-radius: 9px;
  font-size: 22px;
}
.customer-portal-hero h1 {
  margin: clamp(14px, 2vh, 22px) 0 6px;
  font-size: clamp(32px, 3.3vw, 48px);
  line-height: 1.04;
}
.customer-portal-hero p {
  font-size: clamp(13px, 0.95vw, 16px);
}
.customer-portal-projects {
  margin-top: 12px;
  gap: 9px;
  font-size: 14px;
}
.customer-portal-projects span {
  min-height: 28px;
  padding: 3px 16px;
}
.customer-portal-userbox {
  gap: 10px;
  min-width: min(32vw, 440px);
}
.customer-portal-user-pill,
.customer-portal-ghost-btn {
  min-height: 42px;
  border-radius: 11px;
}
.customer-portal-user-pill {
  gap: 9px;
  padding: 0 13px;
  font-size: 15px;
}
.customer-portal-user-icon {
  width: 28px;
  height: 28px;
  font-size: 18px;
}
.customer-portal-ghost-btn {
  gap: 6px;
  padding: 0 16px;
  font-size: 14px;
}
.customer-portal-tabs {
  gap: 12px;
  margin: 16px 0 12px;
}
.customer-portal-tab {
  grid-template-columns: 44px minmax(0, 1fr) 42px;
  gap: 12px;
  min-height: 82px;
  padding: 14px 16px;
  border-radius: 13px;
}
.customer-portal-tab-icon {
  width: 42px;
  height: 42px;
  border-radius: 13px !important;
  font-size: 21px;
}
.customer-portal-tab-text strong {
  font-size: clamp(18px, 1.35vw, 22px);
}
.customer-portal-tab-text em {
  font-size: 12px;
}
.customer-portal-tab-count {
  width: 40px;
  height: 40px;
  font-size: 22px;
}
.customer-portal-settings {
  gap: 14px;
  padding: 13px 18px;
  margin-bottom: 14px;
  border-radius: 13px;
}
.customer-portal-settings > div:first-child {
  grid-template-columns: 46px minmax(0, 1fr);
  column-gap: 12px;
}
.customer-portal-settings-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  font-size: 22px;
}
.customer-portal-settings-title {
  font-size: 20px;
}
.customer-portal-settings p {
  margin-top: 1px;
  font-size: 12px;
}
.customer-switch {
  gap: 7px !important;
  font-size: 13px !important;
}
.customer-switch span {
  width: 42px;
  height: 24px;
}
.customer-switch span::after {
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
}
.customer-switch input:checked + span::after {
  transform: translateX(18px);
}
.customer-portal-settings-controls {
  gap: 9px;
}
.customer-portal-settings-controls select,
.customer-portal-settings-controls button {
  height: 42px;
  border-radius: 10px;
  font-size: 14px;
}
.customer-portal-settings-controls select {
  min-width: 170px;
  padding: 0 14px;
}
.customer-portal-settings-controls button {
  min-width: 132px;
}
.customer-portal-stage {
  padding: 18px;
  border-radius: 13px;
}
.customer-portal-panel-head {
  margin-bottom: 14px;
}
.customer-portal-panel-head h2 {
  font-size: 25px;
}
.customer-portal-panel-head p {
  margin-top: 3px;
  font-size: 13px;
}
.customer-portal-list {
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 14px;
}
.customer-portal-card {
  min-height: min(330px, 36vh);
  padding: 15px 16px 14px;
}
.customer-portal-empty-card {
  min-height: min(330px, 36vh);
}
.customer-portal-card-top {
  margin-bottom: 11px;
}
.customer-portal-card-titleline {
  gap: 10px;
  font-size: 14px;
}
.customer-portal-card-icon {
  width: 28px;
  height: 28px;
  font-size: 15px;
}
.customer-portal-status-pill {
  min-height: 26px;
  padding: 0 10px;
  font-size: 12px;
}
.customer-portal-fields {
  gap: 6px;
}
.customer-portal-field {
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 9px;
  font-size: 13px;
}
.customer-portal-actions {
  gap: 10px;
  margin-top: 16px;
  padding-top: 12px;
}
.customer-portal-primary,
.customer-portal-secondary,
.customer-portal-danger {
  min-height: 38px;
  padding: 0 15px;
  font-size: 14px;
}
.customer-portal-empty-icon {
  width: 76px;
  height: 76px;
  font-size: 30px;
}
@media (max-height: 760px) and (min-width: 1000px) {
  .customer-portal-hero h1 {
    font-size: clamp(30px, 2.8vw, 42px);
    margin-top: 10px;
  }
  .customer-portal-projects {
    margin-top: 8px;
  }
  .customer-portal-tab {
    min-height: 74px;
    padding: 12px 14px;
  }
  .customer-portal-settings {
    padding-top: 11px;
    padding-bottom: 11px;
  }
}

/* Customer portal minimal compact pass: remove decorative icons and tighten density. */
.sparkols-customer-portal {
  padding: 14px clamp(18px, 2.2vw, 30px) 20px;
  color: #142238;
}
.sparkols-customer-portal::before,
.customer-portal-window-dots,
.customer-portal-logo,
.customer-portal-user-icon,
.customer-portal-caret,
.customer-portal-tab-icon,
.customer-portal-settings-icon,
.customer-portal-card-icon,
.customer-portal-empty-icon {
  display: none !important;
}
.customer-portal-hero {
  padding-top: 0;
  gap: 16px;
}
.customer-portal-brand {
  font-size: 15px;
  font-weight: 800;
}
.customer-portal-hero h1 {
  margin: 10px 0 4px;
  font-size: clamp(30px, 2.8vw, 42px);
  line-height: 1.08;
}
.customer-portal-hero p {
  font-size: 13px;
  line-height: 1.45;
}
.customer-portal-projects {
  margin-top: 10px;
  gap: 8px;
  font-size: 13px;
}
.customer-portal-projects span {
  min-height: 24px;
  padding: 2px 12px;
}
.customer-portal-userbox {
  gap: 8px;
  min-width: 0;
}
.customer-portal-user-pill,
.customer-portal-ghost-btn {
  min-height: 34px;
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(29, 55, 61, 0.07);
}
.customer-portal-user-pill {
  padding: 0 11px;
  font-size: 13px;
}
.customer-portal-ghost-btn {
  padding: 0 13px;
  font-size: 13px;
}
.customer-portal-tabs {
  gap: 10px;
  margin: 13px 0 10px;
}
.customer-portal-tab {
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 10px;
  min-height: 58px;
  padding: 10px 13px;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(35, 62, 72, 0.06);
}
.customer-portal-tab-text {
  gap: 1px;
}
.customer-portal-tab-text strong {
  font-size: 17px;
  line-height: 1.15;
}
.customer-portal-tab-text em {
  font-size: 11px;
}
.customer-portal-tab-count {
  width: 32px;
  height: 32px;
  font-size: 18px;
}
.customer-portal-settings {
  gap: 10px;
  padding: 10px 13px;
  margin-bottom: 10px;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(35, 62, 72, 0.06);
}
.customer-portal-settings > div:first-child {
  display: block;
}
.customer-portal-settings-title {
  font-size: 17px;
  line-height: 1.2;
}
.customer-portal-settings p {
  font-size: 11px;
}
.customer-switch {
  gap: 6px !important;
  font-size: 12px !important;
}
.customer-switch span {
  width: 34px;
  height: 20px;
}
.customer-switch span::after {
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
}
.customer-switch input:checked + span::after {
  transform: translateX(14px);
}
.customer-portal-settings-controls {
  gap: 7px;
}
.customer-portal-settings-controls select,
.customer-portal-settings-controls button {
  height: 34px;
  border-radius: 8px;
  font-size: 13px;
}
.customer-portal-settings-controls select {
  min-width: 132px;
  padding: 0 10px;
}
.customer-portal-settings-controls button {
  min-width: 88px;
}
.customer-portal-stage {
  padding: 14px;
  border-radius: 10px;
  box-shadow: 0 8px 22px rgba(35, 62, 72, 0.06);
}
.customer-portal-panel-head {
  margin-bottom: 10px;
}
.customer-portal-panel-head h2 {
  font-size: 22px;
  line-height: 1.2;
}
.customer-portal-panel-head p {
  margin-top: 2px;
  font-size: 12px;
}
.customer-portal-list {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}
.customer-portal-card {
  min-height: 0;
  padding: 12px 13px;
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(35, 62, 72, 0.05);
}
.customer-portal-card-top {
  align-items: center;
  margin-bottom: 8px;
}
.customer-portal-card-titleline {
  gap: 0;
  font-size: 13px;
}
.customer-portal-status-pill {
  min-height: 22px;
  padding: 0 8px;
  font-size: 11px;
}
.customer-portal-fields {
  gap: 4px;
}
.customer-portal-field {
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 8px;
  font-size: 12px;
}
.customer-portal-actions {
  gap: 7px;
  margin-top: 11px;
  padding-top: 9px;
}
.customer-portal-primary,
.customer-portal-secondary,
.customer-portal-danger {
  min-height: 30px;
  padding: 0 11px;
  border-radius: 7px;
  font-size: 12px;
}
.customer-portal-empty-card {
  min-height: 120px;
  border-radius: 10px;
  font-size: 12px;
}
@media (max-width: 1120px) {
  .customer-portal-hero {
    gap: 10px;
  }
  .customer-portal-settings-controls {
    justify-content: flex-start;
  }
}

/* Customer portal CRM alignment: left selector, right content workspace. */
body.sparkols-customer-mode,
body.sparkols-customer-mode #main-container.home-shell {
  background: #f8fafc;
}

body.sparkols-customer-mode #main-container.home-shell > .home-content {
  background: #f8fafc;
}

.sparkols-customer-portal {
  max-width: none;
  min-height: 100vh;
  padding: 18px 20px 22px;
  color: #0f172a;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.sparkols-customer-portal::before {
  display: none !important;
}

.customer-portal-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 16px;
  padding: 0 0 14px;
  margin: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.customer-portal-brand {
  display: block;
  color: #0f766e;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0;
  text-transform: none;
}

.customer-portal-hero h1 {
  margin: 6px 0 4px;
  color: #0f172a;
  font-size: 30px;
  font-weight: 800;
  line-height: 1.15;
}

.customer-portal-hero p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

.customer-portal-projects {
  margin-top: 10px;
  gap: 6px;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
}

.customer-portal-projects::before {
  color: #475569;
  margin-right: 2px;
}

.customer-portal-projects span {
  min-height: 24px;
  padding: 2px 10px;
  border: 1px solid #99f6e4;
  border-radius: 999px;
  background: #ecfdf5;
  color: #0f766e;
  box-shadow: none;
}

.customer-portal-userbox {
  min-width: 0;
  gap: 8px;
  justify-content: flex-end;
}

.customer-portal-user-pill,
.customer-portal-ghost-btn {
  min-height: 34px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  color: #334155;
  backdrop-filter: none;
}

.customer-portal-user-pill {
  padding: 0 12px;
  font-size: 13px;
  font-weight: 700;
}

.customer-portal-ghost-btn {
  padding: 0 12px;
  color: #0f766e;
  font-size: 13px;
  font-weight: 700;
}

.customer-portal-ghost-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  transform: none;
}

.customer-portal-workbench {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  min-height: calc(100vh - 154px);
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.customer-portal-sidebar {
  min-width: 0;
  min-height: 0;
  background: #f6f8fb;
  border-right: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
}

.customer-portal-sidebar-head {
  padding: 14px 16px;
  border-bottom: 1px solid #e2e8f0;
}

.customer-portal-sidebar-head strong {
  display: block;
  color: #0f172a;
  font-size: 14px;
  font-weight: 800;
}

.customer-portal-sidebar-head span {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}

.customer-portal-tabs {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: 0;
}

.customer-portal-tab {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 66px;
  width: 100%;
  padding: 13px 14px 13px 12px;
  border: 0;
  border-bottom: 1px solid #e2e8f0;
  border-left: 4px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #334155;
  box-shadow: none;
  text-align: left;
}

.customer-portal-tab:hover,
.customer-portal-tab.active {
  background: #fff;
  border-left-color: #0f766e;
  color: #0f172a;
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.08);
  transform: none;
}

.customer-portal-tab span {
  float: none;
  background: transparent;
}

.customer-portal-tab.active .customer-portal-tab-text,
.customer-portal-tab.active .customer-portal-tab-text strong {
  background: transparent !important;
  color: #0f172a !important;
}

.customer-portal-tab.active .customer-portal-tab-text em {
  background: transparent !important;
  color: #64748b !important;
}

.customer-portal-tab-text {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.customer-portal-tab-text strong {
  color: inherit;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-portal-tab-text em {
  color: #64748b;
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
  line-height: 1.2;
}

.customer-portal-tab-count,
.customer-portal-tab.active .customer-portal-tab-count {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  width: auto;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px !important;
  background: #e8f7f3 !important;
  color: #0f766e !important;
  font-size: 12px;
  font-weight: 800;
}

.customer-portal-settings {
  display: block;
  margin: auto 0 0;
  padding: 14px;
  border: 0;
  border-top: 1px solid #e2e8f0;
  border-radius: 0;
  background: #f6f8fb;
  box-shadow: none;
}

.customer-portal-settings > div:first-child {
  display: block;
}

.customer-portal-settings-title {
  color: #0f172a;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
}

.customer-portal-settings p {
  margin: 4px 0 10px;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
}

.customer-portal-settings-controls {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  justify-content: stretch;
}

.customer-switch {
  justify-content: space-between;
  gap: 10px !important;
  color: #334155 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

.customer-switch span {
  order: 2;
  flex: 0 0 auto;
  width: 34px;
  height: 20px;
  background: #cbd5e1;
}

.customer-switch span::after {
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
}

.customer-switch input:checked + span {
  background: #0f766e;
}

.customer-switch input:checked + span::after {
  transform: translateX(14px);
}

.customer-portal-settings-controls select,
.customer-portal-settings-controls button {
  width: 100%;
  min-width: 0;
  height: 34px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
}

.customer-portal-settings-controls select {
  border: 1px solid #cbd5e1;
  background-color: #fff;
  color: #0f172a;
  padding: 0 10px;
}

.customer-portal-settings-controls button {
  border: 1px solid #0f766e;
  background: #0f766e;
  color: #fff;
  box-shadow: none;
}

.customer-portal-stage {
  min-width: 0;
  min-height: 0;
  max-height: calc(100vh - 154px);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  overflow: auto;
}

.customer-portal-panel {
  min-height: 100%;
}

.customer-portal-panel.active {
  display: block;
}

.customer-portal-panel-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: block;
  margin: 0;
  padding: 18px 20px 14px;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
}

.customer-portal-panel-head h2 {
  margin: 0;
  color: #0f172a;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.25;
}

.customer-portal-panel-head p {
  margin: 5px 0 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
}

.customer-portal-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 14px;
}

.customer-portal-card {
  min-height: 0;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}

.customer-portal-card:hover {
  border-color: #cbd5e1;
}

.customer-portal-card-top {
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f1f5f9;
}

.customer-portal-card-titleline {
  color: #0f172a;
  font-size: 14px;
  font-weight: 800;
}

.customer-portal-status-pill {
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #e8f7f3;
  color: #0f766e;
  font-size: 12px;
  font-weight: 800;
}

.customer-portal-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
}

.customer-portal-field {
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  color: #334155;
  font-size: 13px;
}

.customer-portal-field-label {
  color: #64748b;
  font-weight: 700;
}

.customer-portal-field-value {
  color: #0f172a;
  font-weight: 600;
}

.customer-portal-field-value a {
  color: #2563eb;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.customer-portal-actions {
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}

.customer-portal-primary,
.customer-portal-secondary,
.customer-portal-danger {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  box-shadow: none;
}

.customer-portal-primary:hover,
.customer-portal-secondary:hover,
.customer-portal-danger:hover {
  transform: none;
}

.customer-portal-primary {
  border: 1px solid #0f766e;
  background: #0f766e;
  color: #fff;
}

.customer-portal-secondary {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
}

.customer-portal-danger {
  border: 1px solid #fecaca;
  background: #fff;
  color: #b91c1c;
}

.customer-portal-feedback {
  margin-top: 12px;
  padding: 9px 10px;
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  background: #f0fdf4;
  color: #166534;
  font-size: 12px;
  font-weight: 700;
}

.customer-portal-empty,
.customer-portal-empty-card {
  min-height: 220px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
  box-shadow: none;
}

@media (max-width: 1080px) {
  .customer-portal-workbench {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .customer-portal-fields {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .sparkols-customer-portal {
    padding: 14px 12px 18px;
  }

  .customer-portal-hero {
    grid-template-columns: 1fr;
  }

  .customer-portal-userbox {
    justify-content: flex-start;
  }

  .customer-portal-workbench {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .customer-portal-sidebar {
    border-right: 0;
    border-bottom: 1px solid #e2e8f0;
  }

  .customer-portal-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .customer-portal-tab {
    border-left: 0;
    border-bottom: 1px solid #e2e8f0;
  }

  .customer-portal-tab.active {
    box-shadow: inset 0 -3px 0 #0f766e;
  }

  .customer-portal-settings {
    margin-top: 0;
  }

  .customer-portal-stage {
    max-height: none;
  }

  .customer-portal-panel-head {
    position: static;
  }
}
