/* Sparkols 2026 redesign theme
 * Visual source: prototypes/sparkols-redesign.
 * This file intentionally sits after home.css so business DOM and JS remain unchanged.
 */
:root {
  --sp-shell: #1e2229;
  --sp-shell-hover: #292f37;
  --sp-canvas: #f5f7fa;
  --sp-surface: #ffffff;
  --sp-soft: #f8fafc;
  --sp-line: #dfe5ec;
  --sp-line-strong: #c9d3df;
  --sp-text: #172033;
  --sp-muted: #667085;
  --sp-muted-2: #98a2b3;
  --sp-teal: #0f8f83;
  --sp-teal-dark: #0b6f67;
  --sp-teal-soft: #e9f7f5;
  --sp-blue: #2563eb;
  --sp-blue-soft: #eff6ff;
  --sp-amber: #b96908;
  --sp-amber-soft: #fff7e6;
  --sp-red: #c2414b;
  --sp-red-soft: #fff1f2;
  --sp-green: #15804a;
  --sp-green-soft: #ecfdf3;
  --sp-radius: 7px;
}

body {
  color: var(--sp-text);
  background: var(--sp-canvas);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea,
select {
  font: inherit;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.18);
  outline-offset: 1px;
}

/* Shell */
#main-container.home-shell {
  color: var(--sp-text);
  background: var(--sp-canvas);
}

#main-container.home-shell > .home-content {
  align-items: stretch;
  padding: 0;
  background: var(--sp-canvas);
  container-type: inline-size;
}

#main-container.home-shell > .home-content > * {
  width: 100%;
  min-width: 0;
  max-width: none;
}

.home-sidebar {
  position: relative;
  top: auto;
  width: 228px;
  flex: 0 0 228px;
  height: 100vh;
  padding: 0;
  color: rgba(255, 255, 255, 0.75);
  background: var(--sp-shell);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  z-index: 40;
}

.home-brand {
  min-height: 82px;
  margin: 0;
  padding: 18px 16px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.home-brand-row {
  width: 100%;
  align-items: center;
  gap: 10px;
}

.home-brand-identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
}

.home-brand-mark {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--sp-teal);
  font-size: 15px;
  font-weight: 800;
}

.home-brand-title {
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0;
}

.home-brand-sub {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 11px;
}

.home-sidebar-collapse-btn {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: grid;
  place-items: center;
  border-color: transparent;
  color: rgba(255, 255, 255, 0.54);
  background: transparent;
}

.home-sidebar-collapse-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.home-sidebar-collapse-btn svg,
.home-sidebar-restore-btn svg,
.home-btn-logout svg {
  width: 17px;
  height: 17px;
}

.home-nav {
  padding: 12px 10px;
  gap: 0;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

.home-nav::-webkit-scrollbar {
  width: 6px;
}

.home-nav::-webkit-scrollbar-track {
  background: transparent;
}

.home-nav::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: transparent;
}

.home-nav.is-scroll-active {
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.home-nav.is-scroll-active::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
}

.home-nav-mail-group {
  margin: 0 0 10px;
  gap: 0;
}

.home-nav-mail-toggle {
  min-height: 30px;
  padding: 7px 11px 5px;
  color: rgba(255, 255, 255, 0.38);
  background: transparent !important;
  border: 0;
  font-size: 11px;
  font-weight: 500;
}

.home-nav-mail-toggle:hover,
.home-nav-mail-toggle.active,
.home-nav-mail-toggle[aria-expanded='true'] {
  color: rgba(255, 255, 255, 0.55);
  background: transparent !important;
}

.home-nav-mail-chevron {
  width: 14px;
  height: 14px;
  color: rgba(255, 255, 255, 0.38);
  transform: none;
}

.home-nav-mail-toggle[aria-expanded='true'] .home-nav-mail-chevron {
  transform: rotate(180deg);
}

.home-nav-mail-sub {
  gap: 2px;
  margin: 0;
  padding: 0;
}

.home-nav > .home-nav-item:not(.home-nav-mail-toggle):not(.home-nav-sub-item),
.home-nav-sub-item,
.home-sidebar-footer .home-nav-item {
  width: 100%;
  min-height: 38px;
  padding: 0 11px !important;
  border: 0 !important;
  border-radius: 6px !important;
  display: flex;
  align-items: center;
  gap: 11px;
  color: rgba(255, 255, 255, 0.68) !important;
  background: transparent !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
  text-decoration: none;
}

.home-nav > .home-nav-item:not(.home-nav-mail-toggle):not(.home-nav-sub-item) {
  margin-bottom: 10px;
}

.home-nav > .home-nav-item:hover,
.home-nav-sub-item:hover,
.home-sidebar-footer .home-nav-item:hover {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.045) !important;
}

.home-nav > .home-nav-item.active,
.home-nav-sub-item.active {
  color: rgba(255, 255, 255, 0.96) !important;
  background: rgba(255, 255, 255, 0.06) !important;
  box-shadow: inset 2px 0 0 #46cbbb !important;
}

.home-nav > .home-nav-item.active:hover,
.home-nav-sub-item.active:hover {
  background: rgba(255, 255, 255, 0.08) !important;
}

.home-nav > .home-nav-item.active .home-nav-icon,
.home-nav-sub-item.active .home-nav-icon {
  color: #5bd7c9;
  stroke-width: 2;
}

.home-nav-icon {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  stroke-width: 1.8;
}

.home-nav-item > span:not(.home-nav-toggle-label) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-sidebar-footer {
  margin: 0;
  padding: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.home-sidebar-footer-link {
  margin-bottom: 8px;
}

.home-sidebar-rail-toggle {
  margin: 0 0 8px;
  font-family: inherit;
  cursor: pointer;
}

.home-sidebar-rail-expand-icon {
  display: none;
}

.home-sidebar-user {
  min-height: 50px;
  padding: 8px;
  gap: 9px;
  color: rgba(255, 255, 255, 0.82);
}

.home-user-avatar {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: #d95175;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.home-user-copy {
  min-width: 0;
  flex: 1;
}

.home-user-copy strong,
.home-user-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-user-copy strong {
  color: #fff;
  font-size: 12px;
}

.home-user-copy small {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.38);
  font-size: 10px;
}

.home-sidebar-user .home-btn-logout {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.48);
  background: transparent;
}

.home-sidebar-user .home-btn-logout:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.home-sidebar-restore-btn {
  align-items: center;
  gap: 7px;
  border-radius: 6px;
  border-color: var(--sp-line);
  color: var(--sp-text);
  background: #fff;
}

.home-sidebar-scrim {
  display: none;
}

/* Desktop collapse keeps a compact icon rail instead of removing navigation. */
@media (min-width: 761px) {
  .home-sidebar {
    transition: width 0.18s ease, flex-basis 0.18s ease;
  }

  body.sparkols-main-sidebar-collapsed .home-sidebar {
    width: 68px;
    flex: 0 0 68px;
    display: flex;
    overflow: visible;
  }

  body.sparkols-main-sidebar-collapsed #main-container.home-shell > .home-content {
    padding-left: 0;
  }

  body.sparkols-main-sidebar-collapsed .home-brand {
    display: none;
  }

  body.sparkols-main-sidebar-collapsed .home-brand-row,
  body.sparkols-main-sidebar-collapsed .home-brand-identity {
    justify-content: center;
  }

  body.sparkols-main-sidebar-collapsed .home-brand-identity > div {
    display: none;
  }

  body.sparkols-main-sidebar-collapsed .home-brand-mark {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  body.sparkols-main-sidebar-collapsed .home-nav {
    padding: 10px 12px;
    overflow-x: visible;
    scrollbar-width: none;
  }

  body.sparkols-main-sidebar-collapsed .home-nav::-webkit-scrollbar {
    display: none;
  }

  body.sparkols-main-sidebar-collapsed .home-nav-mail-toggle {
    display: none !important;
  }

  body.sparkols-main-sidebar-collapsed .home-nav-mail-group {
    margin: 0;
  }

  body.sparkols-main-sidebar-collapsed .home-nav-mail-group + .home-nav-mail-group {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  body.sparkols-main-sidebar-collapsed .home-nav-mail-sub {
    gap: 3px;
  }

  body.sparkols-main-sidebar-collapsed .home-nav > .home-nav-item:not(.home-nav-mail-toggle):not(.home-nav-sub-item),
  body.sparkols-main-sidebar-collapsed .home-nav-sub-item,
  body.sparkols-main-sidebar-collapsed .home-sidebar-footer .home-nav-item {
    width: 44px;
    min-height: 40px;
    margin: 0 auto 3px;
    padding: 0 !important;
    justify-content: center;
    gap: 0;
    border-radius: 9px !important;
  }

  body.sparkols-main-sidebar-collapsed .home-nav > .home-nav-item.active,
  body.sparkols-main-sidebar-collapsed .home-nav-sub-item.active {
    background: rgba(255, 255, 255, 0.065) !important;
    box-shadow: inset 0 0 0 1px rgba(91, 215, 201, 0.3) !important;
  }

  body.sparkols-main-sidebar-collapsed .home-nav-icon {
    width: 18px;
    height: 18px;
    flex-basis: 18px;
  }

  body.sparkols-main-sidebar-collapsed .home-nav-item > span,
  body.sparkols-main-sidebar-collapsed .home-user-copy {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  body.sparkols-main-sidebar-collapsed .home-sidebar-footer {
    padding: 10px 12px;
  }

  body.sparkols-main-sidebar-collapsed .home-sidebar-footer-link,
  body.sparkols-main-sidebar-collapsed .home-sidebar-rail-toggle {
    margin-bottom: 5px;
  }

  body.sparkols-main-sidebar-collapsed .home-sidebar-user {
    min-height: 46px;
    padding: 8px 0;
    justify-content: center;
  }

  body.sparkols-main-sidebar-collapsed .home-sidebar-user .home-btn-logout {
    display: none;
  }

  body.sparkols-main-sidebar-collapsed .home-sidebar-rail-collapse-icon {
    display: none;
  }

  body.sparkols-main-sidebar-collapsed .home-sidebar-rail-expand-icon {
    display: block;
  }

  body.sparkols-main-sidebar-collapsed .home-sidebar-restore-btn,
  body:not(.sparkols-main-sidebar-collapsed) .home-sidebar-restore-btn {
    display: none !important;
  }
}

/* Page header and content */
.home-topbar {
  min-height: 78px;
  margin: 0;
  padding: 16px 24px;
  flex: 0 0 auto;
  align-items: center;
  border-bottom: 1px solid var(--sp-line);
  background: rgba(255, 255, 255, 0.96);
}

.home-h1 {
  color: var(--sp-text);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
}

.home-hint {
  margin-top: 5px;
  color: var(--sp-muted);
  font-size: 12px;
}

#main-container.home-shell > .home-content > .sparkols-page {
  width: 100%;
  min-width: 0;
  max-width: none;
  padding: 20px 24px 28px;
}

#main-container.home-shell > .home-content > .sparkols-page > :not(.sparkols-submit-modal-wrap):not([role='dialog']) {
  min-width: 0;
  max-width: 100%;
}

body.sparkols-shell-inbox-route #main-container.home-shell > .home-content > .sparkols-page,
#main-container.home-shell > .home-content > .sparkols-page-fullwidth {
  padding: 0;
}

#main-container.home-shell > .home-content > #page-projects {
  max-width: none;
}

/* Shared surfaces */
.home-panel,
.sparkols-table-wrap,
.sparkols-project-card,
.sparkols-business-brief-card,
.sparkols-mail-resource-section,
.sparkols-details-panel,
.sparkols-automailer-service-box {
  border-color: var(--sp-line);
  border-radius: var(--sp-radius);
  background: var(--sp-surface);
  box-shadow: none;
}

.sparkols-page-overview .sparkols-overview-wrap,
.sparkols-mail-layout,
.sparkols-keyword-ops-wrap,
.sparkols-business-rec-layout,
.sparkols-analysis-history-panel--full {
  width: 100%;
  min-width: 0;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

.home-panel {
  padding: 16px 18px;
}

.home-kpi {
  border-color: var(--sp-line);
  border-radius: 6px;
  background: var(--sp-surface);
}

.home-kpi-label,
.sparkols-muted {
  color: var(--sp-muted);
}

.home-kpi-value {
  color: var(--sp-text);
}

.sparkols-overview-kpis {
  width: 100%;
  margin-bottom: 18px;
  padding: 0 !important;
  gap: 0;
  grid-template-columns: repeat(auto-fit, minmax(124px, 1fr));
  overflow: hidden;
  border: 1px solid var(--sp-line);
  background: #fff;
}

.sparkols-overview-kpis .home-kpi {
  min-height: 96px;
  padding: 18px;
  border: 0;
  border-radius: 0;
}

.sparkols-overview-kpis .home-kpi + .home-kpi {
  border-left: 1px solid var(--sp-line);
}

.sparkols-overview-kpis .home-kpi-value {
  margin-top: 8px;
  font-size: 22px;
}

.sparkols-overview-section-head {
  margin-bottom: 10px;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.sparkols-overview-section-title-group {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
}

.sparkols-overview-activity-heading-main {
  color: var(--sp-text);
  font-size: 15px;
  font-weight: 700;
}

.sparkols-overview-grid {
  width: 100%;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sparkols-overview-activity-panel,
.sparkols-overview-inbox-panel {
  max-height: min(58vh, 600px);
  border: 1px solid var(--sp-line);
  border-radius: 10px;
  background: #fff;
}

.sparkols-overview-activity-body,
.sparkols-overview-inbox-body {
  padding: 12px;
}

.sparkols-overview-skeleton-card {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  grid-template-columns: 14px minmax(56px, 0.75fr) minmax(72px, 1.6fr) minmax(44px, 0.65fr);
  gap: 8px;
  padding: 10px 12px;
}

.sparkols-overview-skeleton-line,
.sparkols-overview-skeleton-line.is-short,
.sparkols-overview-skeleton-line.is-wide,
.sparkols-overview-skeleton-line.is-mid {
  width: 100%;
  min-width: 0;
}

.sparkols-act-feed-toolbar {
  padding: 10px 14px;
  background: #f7fbfa;
}

.sparkols-act-timeline,
.sparkols-overview-inbox-body .sparkols-inbox-list {
  display: grid;
  gap: 8px;
  padding: 0;
}

.sparkols-act-row {
  display: block;
  padding: 0;
}

.sparkols-act-card {
  position: relative;
  padding: 12px 14px 12px 16px;
  overflow: hidden;
  border: 1px solid var(--sp-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}

.sparkols-act-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  content: '';
  background: var(--sp-teal);
}

.sparkols-act-card--feedback::before { background: #f59e0b; }

.sparkols-act-card-head,
.sparkols-act-identity {
  display: flex;
  align-items: center;
  min-width: 0;
}

.sparkols-act-card-head {
  justify-content: space-between;
  gap: 12px;
}

.sparkols-act-identity {
  flex-wrap: wrap;
  gap: 6px;
}

.sparkols-act-card .sparkols-act-time { flex: 0 0 auto; }
.sparkols-act-card .sparkols-act-chip { margin-left: 2px; }
.sparkols-act-change { margin-top: 8px; }

.sparkols-act-note {
  margin-top: 7px;
  color: var(--sp-muted);
  font-size: 11px;
}

.sparkols-overview-inbox-filters {
  display: flex;
  align-items: center;
  gap: 4px;
}

.sparkols-overview-filter {
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--sp-muted);
  background: transparent;
  cursor: pointer;
  font-size: 11px;
}

.sparkols-overview-filter:hover,
.sparkols-overview-filter.active {
  border-color: #b9dfda;
  color: var(--sp-teal-dark);
  background: #edf9f7;
}

.sparkols-overview-filter.active { font-weight: 700; }

.sparkols-overview-todo-card.sparkols-inbox-row {
  position: relative;
  align-items: center;
  min-height: 62px;
  padding: 12px 14px 12px 16px;
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
}

.sparkols-overview-todo-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  content: '';
  background: var(--sp-teal);
}

.sparkols-overview-todo-card--danger::before { background: #e5484d; }
.sparkols-overview-todo-card--warn::before { background: #f59e0b; }
.sparkols-overview-todo-card--info::before { background: #4f7cff; }
.sparkols-overview-todo-card[hidden] { display: none !important; }

.sparkols-overview-todo-card .sparkols-inbox-actions {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 8px;
}

.sparkols-overview-status {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.sparkols-overview-status--danger { color: #c9373c; background: #fff0f0; }
.sparkols-overview-status--warn { color: #b76e00; background: #fff7e6; }
.sparkols-overview-status--info { color: #315bcc; background: #eef3ff; }
.sparkols-overview-status--teal { color: #087f73; background: #e8f7f4; }

.sparkols-overview-go {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #b9dfda;
  border-radius: 7px;
  color: var(--sp-teal-dark);
  background: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.sparkols-overview-go:hover {
  border-color: var(--sp-teal);
  background: #edf9f7;
}

.sparkols-overview-section,
.sparkols-overview-activity-panel,
.sparkols-overview-inbox-panel,
.sparkols-business-rec-panel,
.sparkols-analysis-grid,
.sparkols-mail-dash,
.sparkols-mail-dash-detail {
  min-width: 0;
  max-width: none;
}

.sparkols-mail-dash-kpis {
  width: 100%;
  max-width: none;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

/* Controls */
.sparkols-btn,
.sparkols-btn-primary,
.home-content .btn.btn-primary {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid var(--sp-teal);
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #fff;
  background: var(--sp-teal);
  font-size: 12px;
  font-weight: 650;
  line-height: 1;
}

.sparkols-btn:hover,
.sparkols-btn-primary:hover,
.home-content .btn.btn-primary:hover {
  border-color: var(--sp-teal-dark);
  background: var(--sp-teal-dark);
}

.sparkols-btn-secondary,
.home-content .btn.btn-secondary,
.sparkols-btn-xs {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--sp-line);
  border-radius: 6px;
  color: #344054;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
}

.sparkols-btn-secondary:hover,
.home-content .btn.btn-secondary:hover,
.sparkols-btn-xs:hover {
  border-color: var(--sp-line-strong);
  color: var(--sp-text);
  background: var(--sp-soft);
}

.sparkols-btn-xs {
  min-height: 28px;
  padding: 0 9px;
  margin: 2px 2px 2px 0;
  font-size: 11px;
}

.sparkols-input,
.home-content input:not([type='checkbox']):not([type='radio']),
.home-content select,
.home-content textarea {
  min-height: 36px;
  border-color: var(--sp-line-strong);
  border-radius: 6px;
  color: var(--sp-text);
  background: #fff;
}

.sparkols-input:hover,
.home-content input:not([type='checkbox']):not([type='radio']):hover,
.home-content select:hover,
.home-content textarea:hover {
  border-color: #aeb9c7;
}

.sparkols-input:focus,
.home-content input:not([type='checkbox']):not([type='radio']):focus,
.home-content select:focus,
.home-content textarea:focus {
  outline: 0;
  border-color: var(--sp-teal);
  box-shadow: 0 0 0 3px rgba(15, 143, 131, 0.12);
}

.home-content input[type='checkbox'],
.home-content input[type='radio'] {
  accent-color: var(--sp-teal);
}

/* Dense operational tables */
.sparkols-table-wrap {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--sp-line);
}

.sparkols-table {
  color: var(--sp-text);
  font-size: 12px;
}

.sparkols-table th,
.sparkols-table td {
  border: 0;
  border-bottom: 1px solid #edf0f4;
  padding: 10px 12px;
}

.sparkols-table th {
  height: 42px;
  color: var(--sp-muted);
  background: var(--sp-soft);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.sparkols-table tbody tr:hover td {
  background: #fbfcfd;
}

.sparkols-status,
.sparkols-badge,
.status-badge {
  border-radius: 4px;
}

/* Mail/workflow sections */
.sparkols-mail-settings-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.sparkols-mail-settings-title {
  color: var(--sp-text);
  font-size: 18px;
  font-weight: 750;
}

.sparkols-mail-settings-intro p {
  margin: 5px 0 0;
  color: var(--sp-muted);
  font-size: 12px;
  line-height: 1.5;
}

.sparkols-mail-settings-save-state {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 7px;
  color: var(--sp-muted);
  font-size: 11px;
}

.sparkols-mail-settings-save-state i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #16a36f;
}

.sparkols-mail-settings-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  margin-bottom: 14px;
  border: 1px solid var(--sp-line);
  border-radius: 9px;
  background: #fff;
}

.sparkols-mail-settings-summary-card {
  min-width: 0;
  min-height: 94px;
  padding: 15px 17px;
  border: 0;
  border-right: 1px solid var(--sp-line);
  text-align: left;
  background: #fff;
  cursor: pointer;
}

.sparkols-mail-settings-summary-card:last-child { border-right: 0; }
.sparkols-mail-settings-summary-card:hover { background: #f7fbfa; }

.sparkols-mail-settings-summary-card span,
.sparkols-mail-settings-summary-card strong,
.sparkols-mail-settings-summary-card small {
  display: block;
  min-width: 0;
}

.sparkols-mail-settings-summary-card span {
  color: var(--sp-muted);
  font-size: 11px;
}

.sparkols-mail-settings-summary-card strong {
  margin-top: 7px;
  overflow: hidden;
  color: var(--sp-text);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sparkols-mail-settings-summary-card small {
  margin-top: 5px;
  color: #98a2b3;
  font-size: 10px;
}

.sparkols-mail-settings-policy-panel {
  margin: 14px 0;
  padding: 16px;
  border: 1px solid var(--sp-line);
  border-radius: 8px;
  background: #fff;
}

.sparkols-mail-settings-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.sparkols-mail-settings-section-head strong {
  display: block;
  color: var(--sp-text);
  font-size: 14px;
}

.sparkols-mail-settings-section-head > div > span {
  display: block;
  margin-top: 4px;
  color: var(--sp-muted);
  font-size: 11px;
}

.sparkols-mail-settings-switch,
.sparkols-mail-settings-platforms label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #344054;
  font-size: 11px;
  white-space: nowrap;
}

.sparkols-mail-settings-policy-grid {
  display: grid;
  grid-template-columns: minmax(140px, 180px) minmax(140px, 180px) minmax(300px, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.sparkols-mail-settings-policy-grid > label {
  display: grid;
  gap: 6px;
  color: #475467;
  font-size: 11px;
}

.sparkols-mail-settings-platforms {
  display: flex;
  min-height: 36px;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 13px;
  padding: 6px 10px;
  border: 1px solid var(--sp-line-strong);
  border-radius: 6px;
}

.sparkols-mail-settings-platforms > span {
  color: var(--sp-muted);
  font-size: 11px;
}

.sparkols-mail-settings-policy-status {
  min-height: 18px;
  margin: 9px 0 0;
  font-size: 11px;
}

.sparkols-mail-settings-flash {
  animation: sparkols-mail-settings-flash 1.2s ease;
}

@keyframes sparkols-mail-settings-flash {
  0%, 100% { box-shadow: none; }
  35% { box-shadow: 0 0 0 3px rgba(15, 143, 131, 0.18); }
}

.sparkols-automailer-service-box {
  display: flex;
  flex-direction: column;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--sp-line);
  border-radius: 9px;
}

.sparkols-automailer-group-box {
  order: -1;
  border-color: var(--sp-line);
  border-radius: 8px;
  background: #f8fafb;
}

.sparkols-template-legacy-group-controls { display: none !important; }

#mail-template-config-panel.home-panel {
  padding: 0;
  border: 0;
  background: transparent;
}

#mail-template-config-panel .sparkols-mail-template-config-grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  gap: 12px;
}

#mail-template-config-panel .sparkols-mail-template-area-card {
  border-color: var(--sp-line);
  border-radius: 8px;
  box-shadow: none;
}

#mail-template-config-panel .sparkols-mail-template-card-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

#mail-template-config-panel .sparkols-mail-template-card {
  min-height: 0;
  padding: 12px;
  border-color: var(--sp-line);
  box-shadow: none;
}

#mail-template-config-panel .sparkols-mail-template-preview-box {
  min-height: 48px;
  max-height: 76px;
}

/* Formal template-group workbench, adapted from the approved group-layout prototype. */
#mail-template-config-panel.sparkols-template-workbench {
  overflow: hidden;
  border: 1px solid var(--sp-line);
  border-radius: 10px;
  background: #fff;
}

.sparkols-template-workbench-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--sp-line);
}

.sparkols-template-workbench-kicker {
  margin-bottom: 5px;
  color: var(--sp-primary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
}

.sparkols-template-workbench-head .sparkols-mad-title { font-size: 20px; }
.sparkols-template-workbench-head p {
  margin: 6px 0 0;
  color: var(--sp-muted);
  font-size: 12px;
}
.sparkols-template-workbench-actions { display: flex; gap: 8px; }

.sparkols-template-purpose-tabs {
  display: flex;
  gap: 4px;
  padding: 10px 24px;
  border-bottom: 1px solid var(--sp-line);
  background: #fbfcfd;
}
.sparkols-template-purpose-tabs button {
  padding: 7px 13px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #667085;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  pointer-events: auto;
}
.sparkols-template-purpose-tabs button:hover { background: #f1f5f6; color: var(--sp-text); }
.sparkols-template-purpose-tabs button.is-active { background: #e7f5f2; color: #087b70; font-weight: 700; }

.sparkols-template-workbench-body {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 560px;
}
.sparkols-template-group-rail {
  padding: 18px 12px;
  border-right: 1px solid var(--sp-line);
  background: #f8fafb;
}
.sparkols-template-column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 8px 12px;
}
.sparkols-template-column-head strong { display: block; color: var(--sp-text); font-size: 13px; }
.sparkols-template-column-head span { display: block; margin-top: 3px; color: var(--sp-muted); font-size: 10px; }
.sparkols-template-group-nav { display: grid; gap: 7px; }
.sparkols-template-group-nav-item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
}
.sparkols-template-group-nav-item:hover { border-color: #dce4ea; background: #fff; }
.sparkols-template-group-nav-item.is-active { border-color: #9eddd6; background: #fff; box-shadow: 0 1px 3px rgba(15,23,42,.04); }
.sparkols-template-group-nav-item.is-active::before {
  content: '';
  position: absolute;
  left: -1px;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--sp-primary);
}
.sparkols-template-group-select {
  min-width: 0;
  padding: 12px 8px 12px 14px;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.sparkols-template-group-nav-top { display: flex; align-items: center; gap: 6px; min-width: 0; }
.sparkols-template-group-nav-top strong { overflow: hidden; color: #263244; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.sparkols-template-group-nav-top em { padding: 2px 5px; border-radius: 4px; background: #e7f5f2; color: #087b70; font-size: 9px; font-style: normal; }
.sparkols-template-group-nav-meta { display: block; overflow: hidden; margin-top: 5px; color: #8993a4; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.sparkols-template-group-nav-actions { display: none; padding-right: 7px; gap: 3px; }
.sparkols-template-group-nav-item:hover .sparkols-template-group-nav-actions { display: flex; }
.sparkols-template-group-nav-actions button { padding: 3px; border: 0; background: transparent; color: #667085; font-size: 10px; cursor: pointer; }
.sparkols-template-group-nav-actions button:hover { color: var(--sp-primary); }
.sparkols-template-group-rail-empty { padding: 28px 10px; color: var(--sp-muted); font-size: 11px; text-align: center; }

.sparkols-template-workbench-main { min-width: 0; padding: 20px 22px 24px; background: #fff; }
.sparkols-template-group-detail { min-height: 245px; border: 1px solid var(--sp-line); border-radius: 9px; }
.sparkols-template-group-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--sp-line); }
.sparkols-template-detail-title { display: flex; align-items: center; gap: 8px; }
.sparkols-template-detail-title strong { color: var(--sp-text); font-size: 17px; }
.sparkols-template-detail-title span { padding: 3px 7px; border-radius: 999px; background: #e7f5f2; color: #087b70; font-size: 10px; }
.sparkols-template-group-detail-head p { margin: 5px 0 0; color: var(--sp-muted); font-size: 11px; }
.sparkols-template-group-stats { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--sp-line); background: #fbfcfd; }
.sparkols-template-group-stats > div { padding: 13px 20px; border-right: 1px solid var(--sp-line); }
.sparkols-template-group-stats > div:last-child { border-right: 0; }
.sparkols-template-group-stats span { display: block; color: var(--sp-muted); font-size: 10px; }
.sparkols-template-group-stats strong { display: block; overflow: hidden; margin-top: 4px; color: #344054; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.sparkols-template-member-head { display: flex; align-items: baseline; gap: 8px; padding: 14px 20px 8px; }
.sparkols-template-member-head strong { color: #344054; font-size: 12px; }
.sparkols-template-member-head span { color: var(--sp-muted); font-size: 10px; }
.sparkols-template-group-members { display: grid; gap: 6px; padding: 0 14px 16px; }
.sparkols-template-group-member { display: grid; grid-template-columns: 14px 24px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--sp-line); border-radius: 7px; }
.sparkols-template-drag { color: #a5adba; font-size: 12px; }
.sparkols-template-member-order { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 5px; background: #f0f3f5; color: #667085; font-size: 10px; }
.sparkols-template-group-member strong { display: block; color: #344054; font-size: 11px; }
.sparkols-template-group-member div span { display: block; margin-top: 2px; color: var(--sp-muted); font-size: 9px; }
.sparkols-template-weight { color: #667085; font-size: 10px; }
.sparkols-template-detail-empty { padding: 24px; color: var(--sp-muted); font-size: 11px; text-align: center; }
.sparkols-template-empty-state { display: grid; min-height: 245px; place-items: center; align-content: center; gap: 7px; padding: 24px; text-align: center; }
.sparkols-template-empty-state strong { color: #344054; font-size: 14px; }
.sparkols-template-empty-state span { max-width: 340px; color: var(--sp-muted); font-size: 11px; }
.sparkols-template-empty-icon { display: grid; width: 38px; height: 38px; place-items: center; border: 1px dashed #9eddd6; border-radius: 9px; background: #effaf8; color: var(--sp-primary); font-size: 20px; }

.sparkols-template-library { margin-top: 18px; border: 1px solid var(--sp-line); border-radius: 9px; }
.sparkols-template-library-head { padding: 14px 16px; border-bottom: 1px solid var(--sp-line); }
.sparkols-template-library-list { display: grid; }
.sparkols-template-library-source-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--sp-line); background: #f8fafc; }
.sparkols-template-library-source-head.is-external { border-top: 1px solid var(--sp-line); background: #f3f9f8; }
.sparkols-template-library-source-head div { min-width: 0; }
.sparkols-template-library-source-head strong,.sparkols-template-library-source-head span { display: block; }
.sparkols-template-library-source-head strong { color: #344054; font-size: 11px; }
.sparkols-template-library-source-head span { margin-top: 2px; color: var(--sp-muted); font-size: 9px; }
.sparkols-template-library-source-head em { flex: 0 0 auto; color: #758195; font-size: 9px; font-style: normal; }
.sparkols-template-library-row-external { background: #fcfefe; }
.sparkols-template-source-chip,.sparkols-template-sync-chip { display: inline-flex; align-items: center; min-height: 20px; padding: 0 7px; border-radius: 99px; font-size: 8px; line-height: 1; }
.sparkols-template-source-chip { border: 1px solid #b8ddd8; background: #edf9f7; color: #087d73; }
.sparkols-template-sync-chip { border: 1px solid #d8e0e8; background: #f5f7f9; color: #68778a; }
.sparkols-template-error-chip { display: inline-flex; align-items: center; min-height: 20px; padding: 0 7px; border: 1px solid #f0b9b4; border-radius: 99px; background: #fff1f1; color: #b42318; font-size: 8px; line-height: 1; }
#mail-template-config-panel .sparkols-template-library-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: 0;
  min-height: 70px;
  padding: 12px 16px;
  border: 0;
  border-bottom: 1px solid var(--sp-line);
  border-radius: 0;
}
#mail-template-config-panel .sparkols-template-library-row:last-child { border-bottom: 0; }
.sparkols-template-library-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 7px; background: #f0f3f5; color: #667085; font-size: 14px; }
.sparkols-template-library-copy { min-width: 0; }
.sparkols-template-library-copy .sparkols-mail-template-card-title { font-size: 12px; }
.sparkols-template-library-copy .sparkols-mail-template-subject { overflow: hidden; margin: 3px 0 5px; color: var(--sp-muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.sparkols-template-library-copy .sparkols-mail-template-card-langs { display: flex; align-items: center; gap: 4px; }
.sparkols-template-version-count { margin-left: 3px; color: #8993a4; font-size: 9px; }

@container (max-width: 820px) {
  .sparkols-template-workbench-body { grid-template-columns: minmax(0, 1fr); }
  .sparkols-template-group-rail { border-right: 0; border-bottom: 1px solid var(--sp-line); }
  .sparkols-template-group-nav { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
}

@container (max-width: 560px) {
  .sparkols-template-workbench-head { flex-direction: column; padding: 18px; }
  .sparkols-template-purpose-tabs { overflow-x: auto; padding-inline: 18px; }
  .sparkols-template-purpose-tabs button { flex: 0 0 auto; }
  .sparkols-template-workbench-main { padding: 14px; }
  .sparkols-template-group-stats { grid-template-columns: minmax(0, 1fr); }
  .sparkols-template-group-stats > div { border-right: 0; border-bottom: 1px solid var(--sp-line); }
  .sparkols-template-group-detail-head { flex-direction: column; }
}

@container (max-width: 960px) {
  #mail-template-config-panel .sparkols-mail-template-config-grid,
  .sparkols-mail-settings-policy-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@container (max-width: 660px) {
  .sparkols-mail-settings-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .sparkols-mail-settings-summary-card {
    min-height: 82px;
    border-right: 0;
    border-bottom: 1px solid var(--sp-line);
  }

  .sparkols-mail-settings-summary-card:last-child { border-bottom: 0; }
  .sparkols-mail-settings-intro,
  .sparkols-mail-settings-section-head { flex-direction: column; }
}

.sparkols-details-panel > summary.sparkols-details-summary {
  color: var(--sp-text);
}

.sparkols-mail-resource-body {
  background: var(--sp-soft);
}

.sparkols-progress-toolbar,
.sparkols-toolbar,
.sparkols-form-inline {
  gap: 8px;
}

/* 智能搜索导入后的候选发件工作区。 */
.search-candidate-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:14px;border:1px solid var(--sp-line);border-radius:10px;background:#fff;overflow:hidden}
.search-candidate-summary>div{padding:14px 16px;border-right:1px solid var(--sp-line)}
.search-candidate-summary>div:last-child{border-right:0}
.search-candidate-summary span,.search-candidate-summary strong{display:block}
.search-candidate-summary span{color:var(--sp-muted);font-size:11px}
.search-candidate-summary strong{margin-top:4px;color:var(--sp-text);font-size:21px}
.search-candidate-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-bottom:14px}
.search-candidate-toolbar #search-candidate-q{width:min(360px,34vw)}
.search-candidate-toolbar #search-candidate-mode,.search-candidate-toolbar #search-candidate-platform,.search-candidate-toolbar #search-candidate-email-scope{width:132px}
.search-candidate-select-all{display:inline-flex;align-items:center;gap:7px;min-height:36px;padding:0 11px;border:1px solid var(--sp-line);border-radius:7px;background:#fff;color:#435268;font-size:11px;font-weight:650;cursor:pointer;white-space:nowrap}
.search-candidate-select-all input{width:15px;height:15px;margin:0;accent-color:#129c91}
.search-candidate-selected-count{margin-left:auto;color:#087d73;font-size:11px;font-weight:700;white-space:nowrap}
.search-candidate-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.search-candidate-card{position:relative;min-width:0;padding:15px;border:1px solid var(--sp-line);border-radius:11px;background:#fff;box-shadow:0 2px 8px rgba(24,34,53,.04);transition:border-color .15s,box-shadow .15s,background-color .15s}
.search-candidate-card.is-selected{border-color:#b8ddd8;background:linear-gradient(180deg,#f6fffd 0,#fff 118px);box-shadow:inset 3px 0 0 #24b8aa,0 6px 18px rgba(24,92,85,.09)}
.search-candidate-card-head{display:flex;align-items:center;gap:10px}
.search-candidate-card-check{display:flex;align-items:center}
.search-candidate-card-check input{display:grid;place-content:center;width:16px;height:16px;margin:0;appearance:none;border:1.5px solid #a8b6c6;border-radius:4px;background:#fff;cursor:pointer;transition:border-color .15s,background-color .15s,box-shadow .15s}
.search-candidate-card-check input::before{content:'✓';color:#fff;font-size:11px;font-weight:800;line-height:1;transform:scale(0);transition:transform .12s}
.search-candidate-card-check input:checked{border-color:#129c91;background:#129c91;box-shadow:0 0 0 3px rgba(18,156,145,.11)}
.search-candidate-card-check input:checked::before{transform:scale(1)}
.search-candidate-card-check input:focus-visible{outline:2px solid rgba(18,156,145,.3);outline-offset:2px}
.search-candidate-avatar{position:relative;display:grid;place-items:center;width:42px;height:42px;flex:0 0 42px;overflow:hidden;border-radius:50%;background:#e9f4f3;color:#087d73;font-weight:700}
.search-candidate-avatar img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.search-candidate-name{min-width:0;flex:1}
.search-candidate-name strong,.search-candidate-name small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.search-candidate-name strong{font-size:14px}
.search-candidate-name small{margin-top:3px;color:var(--sp-muted);font-size:10px}
.search-candidate-mode{align-self:flex-start;padding:4px 7px;border-radius:99px;background:#edf4ff;color:#3970bd;font-size:10px;white-space:nowrap}
.search-candidate-mode.batch{background:#e8f8f5;color:#087d73}
.search-candidate-tags{display:flex;flex-wrap:wrap;gap:5px;margin:12px 0 9px;overflow:visible}
.search-candidate-tags span{max-width:100%;padding:3px 6px;border:1px solid #cfe0ee;border-radius:5px;background:#f5f8fb;color:#526174;font-size:9px;line-height:1.35;overflow-wrap:anywhere;white-space:normal}
.search-candidate-source{display:grid;gap:4px;padding-top:9px;border-top:1px solid #edf1f5;color:var(--sp-muted);font-size:10px}
.search-candidate-source b{color:#445268;font-weight:600}
.search-candidate-name a{color:inherit;text-decoration:none}
.search-candidate-name a:hover{color:#0f8f83;text-decoration:underline}
.search-candidate-avatar-link{display:block;flex:0 0 42px;border-radius:50%;text-decoration:none}
.search-candidate-avatar-link:focus-visible{outline:2px solid #129c91;outline-offset:2px}
.search-candidate-actions{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-top:10px;padding-top:9px;border-top:1px solid #edf1f5}
.search-candidate-profile-link{display:inline-flex;align-items:center;gap:5px;padding:6px 9px;border:1px solid #c8d6e3;border-radius:6px;background:#fff;color:#415166;font-size:10px;font-weight:600;text-decoration:none}
.search-candidate-profile-link:hover{border-color:#67c9bf;color:#087d73;background:#f0fbf9}
.search-candidate-profile-link.is-disabled{opacity:.55;cursor:default}
.search-candidate-edit-btn{padding:6px 9px;font-size:10px}
.search-candidate-page-size{display:inline-flex;align-items:center;gap:6px;color:#6b788b;font-size:11px;white-space:nowrap}.search-candidate-page-size .sparkols-input{width:68px;min-height:36px;padding-inline:8px}
.search-candidate-pagination{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-top:18px;padding:12px 14px;border:1px solid var(--sp-line);border-radius:10px;background:#fff}.search-candidate-pagination[hidden]{display:none}.search-candidate-page-summary{color:#778498;font-size:11px}.search-candidate-page-controls{display:flex;align-items:center;gap:6px}.search-candidate-page-controls button{min-width:34px;height:34px;padding:0 10px;border:1px solid #d6e0e8;border-radius:7px;background:#fff;color:#435268;font:inherit;font-size:11px;font-weight:650;cursor:pointer}.search-candidate-page-controls button:hover:not(:disabled){border-color:#72cfc5;background:#f1fbf9;color:#087d73}.search-candidate-page-controls button.is-active{border-color:#129c91;background:#129c91;color:#fff}.search-candidate-page-controls button:disabled{opacity:.42;cursor:default}.search-candidate-page-gap{padding:0 2px;color:#9aa5b3}
.influencer-pool-pagination{margin-top:12px}.influencer-pool-page-summary{display:flex;align-items:center;gap:14px;flex-wrap:wrap}.influencer-pool-page-size{display:inline-flex;align-items:center;gap:6px;color:#64748b;font-size:11px}.influencer-pool-page-size select{width:74px;min-height:32px;padding:4px 24px 4px 9px}
.sparkols-candidate-edit-card{width:min(720px,calc(100vw - 32px))}
.search-candidate-edit-help{margin:12px 0 0;font-size:11px}
.search-candidate-empty{grid-column:1/-1;padding:70px 20px;text-align:center;border:1px dashed var(--sp-line);border-radius:11px;background:#fff;color:var(--sp-muted)}
@media(max-width:1300px){.search-candidate-list{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.search-candidate-summary{grid-template-columns:repeat(2,1fr)}.search-candidate-summary>div:nth-child(2){border-right:0}.search-candidate-summary>div:nth-child(-n+2){border-bottom:1px solid var(--sp-line)}.search-candidate-toolbar #search-candidate-q{order:-1;width:100%}.search-candidate-toolbar #search-candidate-mode,.search-candidate-toolbar #search-candidate-platform,.search-candidate-toolbar #search-candidate-email-scope{width:calc(50% - 4px)}.search-candidate-selected-count{margin-left:0}.search-candidate-list{grid-template-columns:1fr}.search-candidate-pagination{align-items:flex-start;flex-direction:column}.search-candidate-page-controls{max-width:100%;overflow-x:auto;padding-bottom:2px}}

.sparkols-search-center-embed-wrap{width:100%;height:calc(100vh - 82px);min-height:560px;overflow:hidden;background:var(--sp-canvas)}
.sparkols-search-center-frame{display:block;width:100%;height:100%;border:0;background:var(--sp-canvas)}

/* The embedded search center already has its own page header. */
body[data-sparkols-route="/search-center"] .home-topbar{display:none}
body[data-sparkols-route="/search-center"] .sparkols-search-center-embed-wrap{height:100vh;min-height:0}

/* Keep full-height inbox visually integrated with the new shell. */
body.sparkols-shell-inbox-route .sparkols-mail-inbox-embed-wrap {
  border: 0;
  background: var(--sp-canvas);
  box-shadow: none;
}

/* Responsive shell mirrors the reference prototype. */
@media (max-width: 1050px) {
  .home-sidebar {
    width: 204px;
    flex-basis: 204px;
  }

  #main-container.home-shell > .home-content > .sparkols-page {
    padding-inline: 18px;
  }

  .sparkols-overview-kpis {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }

  .sparkols-overview-kpis .home-kpi {
    border-left: 1px solid var(--sp-line);
    border-top: 1px solid var(--sp-line);
  }
}

@container (max-width: 760px) {
  .sparkols-overview-kpis {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .sparkols-overview-grid,
  .sparkols-analysis-grid,
  .sparkols-mail-dash-detail {
    grid-template-columns: minmax(0, 1fr);
  }
}

@container (max-width: 560px) {
  .sparkols-overview-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sparkols-overview-section-head,
  .sparkols-overview-section-title-group {
    align-items: flex-start;
  }

  .sparkols-overview-section-head {
    flex-direction: column;
  }

  .sparkols-overview-todo-card.sparkols-inbox-row,
  .sparkols-act-card-head {
    align-items: flex-start;
  }

  .sparkols-overview-todo-card.sparkols-inbox-row {
    flex-direction: column;
  }

  .sparkols-overview-todo-card .sparkols-inbox-actions {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 760px) {
  .home-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(280px, 84vw);
    flex-basis: auto;
    transform: translateX(-102%);
    transition: transform 0.2s ease;
    box-shadow: 14px 0 40px rgba(15, 23, 42, 0.3);
  }

  body:not(.sparkols-main-sidebar-collapsed) .home-sidebar {
    transform: translateX(0);
  }

  body.sparkols-main-sidebar-collapsed .home-sidebar {
    display: flex;
    transform: translateX(-102%);
  }

  body.sparkols-main-sidebar-collapsed #main-container.home-shell > .home-content {
    padding-left: 0;
  }

  .home-sidebar-scrim {
    position: fixed;
    inset: 0 0 0 min(280px, 84vw);
    z-index: 35;
    display: block;
    border: 0;
    background: rgba(15, 23, 42, 0.42);
  }

  body.sparkols-main-sidebar-collapsed .home-sidebar-scrim {
    display: none;
  }

  .home-topbar {
    min-height: 68px;
    padding: 12px 15px 12px 58px;
  }

  .home-h1 {
    font-size: 17px;
  }

  .home-hint {
    max-width: 70vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .home-sidebar-restore-btn {
    width: 36px;
    padding: 0;
    display: inline-flex;
    justify-content: center;
  }

  body:not(.sparkols-main-sidebar-collapsed) .home-sidebar-restore-btn {
    display: none;
  }

  .home-sidebar-restore-btn span {
    display: none;
  }

  #main-container.home-shell > .home-content > .sparkols-page {
    padding: 14px;
  }

  .sparkols-overview-kpis .home-kpi {
    min-height: 88px;
    padding: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

/* Mail config: formal two-step campaign workspace. Legacy controls remain mounted for real API state. */
body[data-sparkols-route="/mail/config"] #page-mail .sparkols-mail-layout > :not(#mail-campaign-workbench):not(#mad-filter-modal):not(#mad-preview-modal) {
  display: none !important;
}

.sparkols-mail-campaign-workbench { width: 100%; color: #172033; }
body:not([data-sparkols-route="/mail/config"]) #mail-campaign-workbench { display: none !important; }
.sparkols-mail-campaign-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.sparkols-mail-campaign-hero h1 { margin: 0; font-size: 25px; letter-spacing: -.02em; }
.sparkols-mail-campaign-hero p { margin: 8px 0 0; color: #718096; font-size: 13px; }
.sparkols-mail-campaign-settings-btn { padding: 9px 13px; border: 1px solid #cbd6e3; border-radius: 8px; background: #fff; color: #3f4d5d; font-weight: 650; cursor: pointer; }
.sparkols-mail-campaign-stepper { display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; margin-bottom: 16px; border: 1px solid #dce4ee; border-radius: 10px; background: #fff; }
.sparkols-mail-campaign-stepper button { display: flex; align-items: center; gap: 12px; padding: 17px 20px; border: 0; border-right: 1px solid #dce4ee; background: #fff; color: #172033; text-align: left; cursor: pointer; }
.sparkols-mail-campaign-stepper button:last-child { border-right: 0; }
.sparkols-mail-campaign-stepper button.is-active { background: #edf5ff; }
.sparkols-mail-campaign-stepper button > span { display: grid; width: 30px; height: 30px; flex: 0 0 30px; place-items: center; border: 1px solid #cbd6e3; border-radius: 50%; color: #59677a; font-weight: 700; }
.sparkols-mail-campaign-stepper button.is-active > span { border-color: #1677ff; background: #1677ff; color: #fff; }
.sparkols-mail-campaign-stepper strong,.sparkols-mail-campaign-stepper small { display: block; }
.sparkols-mail-campaign-stepper strong { font-size: 13px; }
.sparkols-mail-campaign-stepper small { margin-top: 3px; color: #718096; font-size: 11px; }
.sparkols-mail-campaign-panel { overflow: hidden; border: 1px solid #dce4ee; border-radius: 10px; background: #fff; }
.sparkols-mail-campaign-panel[hidden] { display: none !important; }
.sparkols-mail-campaign-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 22px; border-bottom: 1px solid #dce4ee; }
.sparkols-mail-campaign-panel > header h2 { margin: 0; font-size: 18px; }
.sparkols-mail-campaign-panel > header p { margin: 6px 0 0; color: #718096; font-size: 12px; }
.sparkols-mail-source-tabs { display: flex; padding: 3px; border: 1px solid #cbd6e3; border-radius: 8px; background: #f4f7fb; }
.sparkols-mail-source-tabs button { padding: 8px 11px; border: 0; border-radius: 6px; background: transparent; color: #59677a; cursor: pointer; }
.sparkols-mail-source-tabs button.is-active { background: #fff; color: #1677ff; box-shadow: 0 1px 3px rgba(15,23,42,.08); font-weight: 700; }
.sparkols-mail-campaign-task-picker { margin: 18px 22px 0; border: 1px solid #dce4ee; border-radius: 8px; background: #fbfcfd; }
.sparkols-mail-campaign-task-picker-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-bottom: 1px solid #e6ebf1; }
.sparkols-mail-campaign-task-picker-head strong,.sparkols-mail-campaign-task-picker-head span { display: block; }
.sparkols-mail-campaign-task-picker-head strong { font-size: 12px; }
.sparkols-mail-campaign-task-picker-head span { margin-top: 3px; color: #718096; font-size: 10px; }
.sparkols-mail-campaign-task-picker-head button { border: 0; background: transparent; color: #1677ff; font-size: 11px; cursor: pointer; }
#mail-campaign-task-list { display: grid; grid-template-columns: repeat(auto-fit,minmax(260px,1fr)); gap: 0; max-height: 174px; overflow: auto; }
.sparkols-mail-campaign-task-option { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 9px; padding: 11px 14px; border-bottom: 1px solid #edf1f5; color: #344054; cursor: pointer; }
.sparkols-mail-campaign-task-option:hover { background: #f4f8fc; }
.sparkols-mail-campaign-task-option strong,.sparkols-mail-campaign-task-option small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sparkols-mail-campaign-task-option strong { font-size: 11px; }
.sparkols-mail-campaign-task-option small { margin-top: 3px; color: #718096; font-size: 9px; }
.sparkols-mail-campaign-task-option em { padding: 3px 5px; border-radius: 4px; background: #172033; color: #fff; font-size: 9px; font-style: normal; text-transform: uppercase; }
.sparkols-mail-campaign-filter-grid { display: grid; grid-template-columns: 120px minmax(0,1fr) minmax(240px,.7fr) minmax(240px,.7fr); align-items: end; gap: 18px; padding: 22px; }
.sparkols-mail-campaign-filter-label { align-self: center; color: #59677a; font-size: 12px; font-weight: 700; }
.sparkols-mail-campaign-filter-label:nth-of-type(5) { grid-row: 2; }
.sparkols-mail-campaign-field label,.sparkols-mail-campaign-quality > label,.sparkols-mail-campaign-quality-fields label { display: block; margin-bottom: 6px; color: #59677a; font-size: 11px; font-weight: 650; }
.sparkols-mail-campaign-field input,.sparkols-mail-campaign-quality input,.sparkols-mail-campaign-quality select { width: 100%; height: 38px; padding: 0 10px; border: 1px solid #cbd6e3; border-radius: 7px; background: #fff; }
#mail-campaign-platforms { display: flex; flex-wrap: wrap; gap: 7px; }
#mail-campaign-platforms button,.sparkols-mail-follower-presets > button { height: 36px; padding: 0 11px; border: 1px solid #cbd6e3; border-radius: 7px; background: #fff; color: #3f4d5d; cursor: pointer; }
#mail-campaign-platforms button.is-active,.sparkols-mail-follower-presets > button.is-active { border-color: #8cbcff; background: #edf5ff; color: #1677ff; font-weight: 700; }
.sparkols-mail-campaign-quality { grid-column: 2/-1; padding-top: 18px; border-top: 1px solid #e6ebf1; }
.sparkols-mail-follower-presets { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.sparkols-mail-follower-presets > span { display: flex; align-items: center; gap: 7px; }
.sparkols-mail-follower-presets > span input { width: 135px; }
.sparkols-mail-follower-presets b { color: #718096; font-size: 11px; font-weight: 400; }
.sparkols-mail-campaign-quality-fields { display: grid; grid-template-columns: repeat(3,minmax(170px,240px)); gap: 14px; margin-top: 16px; }
.sparkols-mail-campaign-funnel { display: flex; align-items: center; gap: 9px; min-height: 56px; margin: 0 22px 18px; padding: 12px 14px; border-radius: 8px; background: #f6f9fc; color: #59677a; font-size: 12px; }
.sparkols-mail-campaign-funnel strong { color: #172033; }
.sparkols-mail-campaign-funnel i { color: #9aa5b4; font-style: normal; }
.sparkols-mail-campaign-panel > footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 22px; border-top: 1px solid #dce4ee; background: #fbfcfd; }
.sparkols-mail-campaign-panel > footer strong,.sparkols-mail-campaign-panel > footer small { display: block; }
.sparkols-mail-campaign-panel > footer small { margin-top: 4px; color: #718096; font-size: 11px; }
.sparkols-mail-campaign-panel > footer > div:last-child { display: flex; gap: 8px; }
.sparkols-mail-auto-save-state{display:inline-flex;align-items:center;min-height:31px;padding:0 11px;border:1px solid #d9e3ed;border-radius:99px;background:#fff;color:#68778a;font-size:10px;font-weight:650;white-space:nowrap}
.sparkols-mail-auto-save-state.is-saved{border-color:#b8ddd8;background:#edf9f7;color:#087d73}
.sparkols-mail-auto-save-state.is-paused{border-color:#d7dfe8;background:#f3f6f8;color:#657386}
.sparkols-mail-auto-configured-card{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:14px;margin:18px;padding:20px 22px;border:1px solid #a9ddd6;border-radius:11px;background:linear-gradient(135deg,#f0fbf8,#f8fffd);box-shadow:0 8px 24px rgba(18,156,145,.08)}
.sparkols-mail-auto-configured-card[hidden]{display:none}.sparkols-mail-auto-configured-mark{display:grid;width:40px;height:40px;place-items:center;border-radius:50%;background:#129c91;color:#fff;font-size:20px;font-weight:800;box-shadow:0 5px 14px rgba(18,156,145,.2)}
#mail-auto-step-one-header[hidden],#mail-auto-step-one-form[hidden],#mail-auto-step-one-footer[hidden]{display:none!important}
.sparkols-mail-auto-configured-copy strong,.sparkols-mail-auto-configured-copy span{display:block}.sparkols-mail-auto-configured-copy strong{color:#116b64;font-size:16px}.sparkols-mail-auto-configured-copy span{margin-top:3px;color:#38847e;font-size:10px}.sparkols-mail-auto-configured-copy p{margin:8px 0 0;color:#526b68;font-size:11px;line-height:1.6}.sparkols-mail-auto-edit-btn{min-width:70px;padding:7px 13px!important;font-size:10px!important}
.sparkols-mail-auto-configured-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px}.sparkols-mail-auto-configured-switch{min-height:34px;padding:0 12px;border:1px solid #b9ddd8;border-radius:9px;background:rgba(255,255,255,.72);white-space:nowrap}.sparkols-mail-auto-configured-switch b{min-width:92px;color:#356d68;font-size:10px}.sparkols-mail-auto-configured-switch:has(input:checked){border-color:#82cec5;background:#fff}.sparkols-mail-auto-configured-switch input:disabled+span{opacity:.55}.sparkols-mail-auto-configured-switch:has(input:disabled){cursor:wait}
.sparkols-mail-campaign-hero[hidden],.sparkols-mail-campaign-stepper[hidden]{display:none!important}.sparkols-mail-auto-config-loading{display:none;min-height:calc(100vh - 74px);place-items:center;align-content:center;gap:8px;text-align:center;color:#536579}.sparkols-mail-auto-config-loading strong,.sparkols-mail-auto-config-loading small{display:block}.sparkols-mail-auto-config-loading strong{margin-top:4px;color:#203047;font-size:15px}.sparkols-mail-auto-config-loading small{font-size:10px;color:#8190a3}.sparkols-mail-auto-config-spinner{width:30px;height:30px;border:3px solid #d9e6e5;border-top-color:#129c91;border-radius:50%;animation:sparkols-mail-auto-spin .75s linear infinite}@keyframes sparkols-mail-auto-spin{to{transform:rotate(360deg)}}.sparkols-mail-campaign-workbench.is-checking-config>.sparkols-mail-auto-config-loading{display:grid}.sparkols-mail-campaign-workbench.is-checking-config>.sparkols-mail-campaign-hero,.sparkols-mail-campaign-workbench.is-checking-config>.sparkols-mail-campaign-stepper,.sparkols-mail-campaign-workbench.is-checking-config>.sparkols-mail-campaign-panel{display:none!important}.sparkols-mail-campaign-workbench.is-configured-summary{display:grid;min-height:calc(100vh - 74px);padding:0;place-items:center}.sparkols-mail-campaign-workbench.is-configured-summary #mail-auto-step-one{width:min(1120px,calc(100% - 36px));padding:0;border:0;background:transparent;box-shadow:none}.sparkols-mail-campaign-workbench.is-configured-summary .sparkols-mail-auto-configured-card{margin:0}
.sparkols-mail-auto-switch{display:inline-flex;align-items:center;gap:8px;color:#334155;font-size:11px;cursor:pointer}.sparkols-mail-auto-switch input{position:absolute;opacity:0;pointer-events:none}.sparkols-mail-auto-switch span{position:relative;width:36px;height:20px;border-radius:99px;background:#cad4df;transition:.18s}.sparkols-mail-auto-switch span::after{content:"";position:absolute;top:3px;left:3px;width:14px;height:14px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(15,23,42,.2);transition:.18s}.sparkols-mail-auto-switch input:checked+span{background:#129c91}.sparkols-mail-auto-switch input:checked+span::after{transform:translateX(16px)}
.sparkols-mail-auto-form{display:grid;gap:12px;padding:16px}.sparkols-mail-auto-block{padding:15px 16px;border:1px solid #dce5ed;border-radius:9px;background:#fff}.sparkols-mail-auto-block-primary{background:linear-gradient(135deg,#fbfdff,#f7fbff)}.sparkols-mail-auto-block-title{display:flex;align-items:center;gap:10px;margin-bottom:13px}.sparkols-mail-auto-block-title>span{display:grid;width:26px;height:26px;place-items:center;border-radius:7px;background:#e9f3ff;color:#1677ff;font-size:9px;font-weight:800}.sparkols-mail-auto-block-title strong,.sparkols-mail-auto-block-title small{display:block}.sparkols-mail-auto-block-title strong{font-size:12px}.sparkols-mail-auto-block-title small{margin-top:2px;color:#7b8797;font-size:9px;font-weight:400}
.sparkols-mail-auto-grid{display:grid;gap:12px}.sparkols-mail-auto-grid.four{grid-template-columns:repeat(4,minmax(0,1fr))}.sparkols-mail-auto-grid.two{grid-template-columns:minmax(220px,.45fr) minmax(0,1fr)}.sparkols-mail-auto-grid>label,.sparkols-mail-auto-mailbox-row>label{display:grid;gap:5px;color:#526174;font-size:10px;font-weight:650}.sparkols-mail-auto-grid input,.sparkols-mail-auto-grid select,.sparkols-mail-auto-mailbox-row select{width:100%;height:36px;padding:0 10px;border:1px solid #cbd6e3;border-radius:7px;background:#fff;color:#263244;font-size:11px}.sparkols-mail-auto-grid>label>small{color:#8a96a6;font-size:8.5px;font-weight:400}.sparkols-mail-auto-weekdays{display:flex;align-items:center;flex-wrap:wrap;gap:7px;margin-top:13px;padding-top:12px;border-top:1px solid #e6edf3}.sparkols-mail-auto-weekdays>span,.sparkols-mail-auto-platforms>span{margin-right:4px;color:#526174;font-size:10px;font-weight:700}.sparkols-mail-auto-weekdays label,.sparkols-mail-auto-platforms label{display:inline-flex;align-items:center;gap:5px;padding:6px 8px;border:1px solid #d5dfe8;border-radius:6px;background:#fff;color:#536277;font-size:9px;cursor:pointer}.sparkols-mail-auto-weekdays label:has(input:checked),.sparkols-mail-auto-platforms label:has(input:checked){border-color:#81cfc7;background:#eefaf8;color:#087d73}.sparkols-mail-auto-mailbox-row{display:grid;grid-template-columns:minmax(260px,1fr) auto auto;align-items:end;gap:9px}.sparkols-mail-auto-platforms{display:flex;align-items:center;align-self:end;flex-wrap:wrap;gap:7px;padding-bottom:1px}.sparkols-mail-auto-status{padding:9px 11px;border-radius:7px;background:#f5f8fb;color:#68778a;font-size:9.5px}.sparkols-mail-auto-status.is-error{background:#fff1f1;color:#b42318}.sparkols-mail-auto-status.is-saved{background:#edf9f7;color:#087d73}
.sparkols-mail-auto-template-actions{display:flex;gap:8px}.sparkols-mail-auto-template-summary{display:grid;grid-template-columns:repeat(3,1fr);margin:16px;border:1px solid #dce5ed;border-radius:9px;background:#f8fafc}.sparkols-mail-auto-template-summary>div{padding:12px 14px;border-right:1px solid #dce5ed}.sparkols-mail-auto-template-summary>div:last-child{border-right:0}.sparkols-mail-auto-template-summary span,.sparkols-mail-auto-template-summary strong{display:block}.sparkols-mail-auto-template-summary span{color:#7b8797;font-size:9px}.sparkols-mail-auto-template-summary strong{margin-top:4px;color:#334155;font-size:11px}.sparkols-mail-auto-template-mount{padding:0 16px 16px}.sparkols-mail-auto-template-mount .sparkols-template-workbench{margin:0!important;border-color:#dce5ed;box-shadow:none}
@media(max-width:1050px){.sparkols-mail-auto-grid.four{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:720px){.sparkols-mail-auto-grid.four,.sparkols-mail-auto-grid.two,.sparkols-mail-auto-template-summary{grid-template-columns:1fr}.sparkols-mail-auto-mailbox-row{grid-template-columns:1fr}.sparkols-mail-auto-template-summary>div{border-right:0;border-bottom:1px solid #dce5ed}.sparkols-mail-auto-template-summary>div:last-child{border-bottom:0}.sparkols-mail-auto-template-actions{flex-wrap:wrap}.sparkols-mail-auto-configured-card{grid-template-columns:auto 1fr;margin:12px}.sparkols-mail-auto-configured-actions{grid-column:1/-1}.sparkols-mail-auto-configured-actions button{flex:1}}
.sparkols-mail-campaign-preview-layout { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(280px,.55fr); gap: 16px; padding: 0 22px 22px; }
.sparkols-mail-campaign-email-preview,.sparkols-mail-campaign-confirm { min-height: 370px; border: 1px solid #dce4ee; border-radius: 9px; background: #fff; }
.sparkols-mail-campaign-email-preview { overflow: hidden; }
.sparkols-mail-campaign-preview-recipient { display: flex; gap: 10px; padding: 16px 18px; border-bottom: 1px solid #e6ebf1; }
.sparkols-mail-campaign-preview-recipient b { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; background: #e7507d; color: #fff; }
.sparkols-mail-campaign-preview-recipient strong,.sparkols-mail-campaign-preview-recipient span { display: block; }
.sparkols-mail-campaign-preview-recipient span { margin-top: 3px; color: #718096; font-size: 10px; }
.sparkols-mail-campaign-preview-subject { padding: 14px 18px; border-bottom: 1px solid #e6ebf1; font-weight: 700; }
.sparkols-mail-campaign-email-preview iframe { display: block; width: 100%; height: 260px; border: 0; background: #fff; }
.sparkols-mail-campaign-confirm { padding: 18px; }
.sparkols-mail-campaign-confirm h3 { margin: 0 0 12px; font-size: 15px; }
.sparkols-mail-campaign-confirm dl { margin: 0; }
.sparkols-mail-campaign-confirm dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid #e6ebf1; }
.sparkols-mail-campaign-confirm dt { color: #718096; font-size: 11px; }
.sparkols-mail-campaign-confirm dd { margin: 0; color: #263244; font-size: 11px; font-weight: 700; text-align: right; }
.sparkols-mail-campaign-settings-modal { position: fixed; inset: 0; z-index: 150; display: none; align-items: center; justify-content: center; padding: 22px; }
.sparkols-mail-campaign-settings-modal.is-open { display: flex; }
.sparkols-mail-campaign-settings-backdrop { position: absolute; inset: 0; border: 0; background: rgba(15,23,42,.46); }
.sparkols-mail-campaign-settings-card { position: relative; width: min(1180px,calc(100vw - 44px)); max-height: calc(100vh - 44px); overflow: auto; border-radius: 12px; background: #f6f8fb; box-shadow: 0 30px 90px rgba(15,23,42,.3); }
.sparkols-mail-campaign-settings-card > header { position: sticky; top: 0; z-index: 4; display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid #dce4ee; background: #fff; }
.sparkols-mail-campaign-settings-card h2 { margin: 0; font-size: 18px; }
.sparkols-mail-campaign-settings-card header p { margin: 4px 0 0; color: #718096; font-size: 11px; }
.sparkols-mail-campaign-settings-card header button { width: 34px; height: 34px; border: 1px solid #cbd6e3; border-radius: 7px; background: #fff; font-size: 20px; cursor: pointer; }
#mail-campaign-settings-content { padding: 16px; }
#mail-campaign-settings-content > #sparkols-automailer-details { display: block !important; margin: 0 !important; }
#mail-campaign-settings-content > #sparkols-automailer-details > summary { display: none; }
body.sparkols-mail-campaign-modal-open { overflow: hidden; }

@container (max-width: 980px) {
  .sparkols-mail-campaign-filter-grid { grid-template-columns: 100px minmax(0,1fr) minmax(0,1fr); }
  .sparkols-mail-campaign-platform-field { grid-column: 2/-1; }
  .sparkols-mail-campaign-filter-label:nth-of-type(5) { grid-row: auto; }
  .sparkols-mail-campaign-quality { grid-column: 2/-1; }
  .sparkols-mail-campaign-preview-layout { grid-template-columns: 1fr; }
}
@container (max-width: 680px) {
  .sparkols-mail-campaign-hero,.sparkols-mail-campaign-panel > header,.sparkols-mail-campaign-panel > footer { align-items: stretch; flex-direction: column; }
  .sparkols-mail-campaign-filter-grid { grid-template-columns: 1fr; }
  .sparkols-mail-campaign-filter-label,.sparkols-mail-campaign-field,.sparkols-mail-campaign-quality { grid-column: 1; }
  .sparkols-mail-campaign-quality-fields { grid-template-columns: 1fr; }
  .sparkols-mail-campaign-stepper button { padding: 13px; }
  .sparkols-mail-campaign-panel > footer > div:last-child { justify-content: flex-end; }
}

/* The automatic-send workbench already has its own step title and description. */
body[data-sparkols-route="/mail/config"] .home-topbar,
body[data-sparkols-route="/mail/dispatch"] .home-topbar {
  display: none;
}
body[data-sparkols-route="/mail/config"] #main-container.home-shell > .home-content > #page-mail {
  padding: 14px 18px 20px;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-hero { margin-bottom: 13px; }
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-hero h1 { font-size: 20px; }
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-hero p { margin-top: 5px; font-size: 11px; }
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-settings-btn { padding: 7px 10px; border-radius: 7px; font-size: 11px; }
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-stepper { margin-bottom: 11px; border-radius: 8px; }
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-stepper button { gap: 9px; padding: 11px 15px; }
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-stepper button > span { width: 25px; height: 25px; flex-basis: 25px; font-size: 11px; }
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-stepper strong { font-size: 11px; }
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-stepper small { margin-top: 2px; font-size: 9px; }
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-panel { border-radius: 8px; }
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-panel > header { padding: 13px 16px; }
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-panel > header h2 { font-size: 15px; }
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-panel > header p { margin-top: 4px; font-size: 10px; }
body[data-sparkols-route="/mail/config"] .sparkols-mail-source-tabs button { padding: 6px 9px; font-size: 10px; }
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-task-picker { margin: 11px 16px 0; }
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-task-picker-head { padding: 8px 10px; }
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-task-picker-head strong { font-size: 10px; }
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-task-picker-head span { font-size: 9px; }
body[data-sparkols-route="/mail/config"] #mail-campaign-task-list { max-height: 116px; }
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-task-option { gap: 7px; padding: 7px 10px; }
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-task-option strong { font-size: 10px; }
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-task-option small { margin-top: 2px; font-size: 8px; }
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-task-option em { font-size: 8px; }
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-filter-grid { grid-template-columns: 92px minmax(0,1fr) minmax(210px,.7fr) minmax(210px,.7fr); gap: 12px; padding: 15px 16px; }
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-filter-label { font-size: 10px; }
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-field label,
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-quality > label,
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-quality-fields label { margin-bottom: 4px; font-size: 9px; }
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-field input,
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-quality input,
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-quality select { height: 32px; font-size: 10px; }
body[data-sparkols-route="/mail/config"] #mail-campaign-platforms button,
body[data-sparkols-route="/mail/config"] .sparkols-mail-follower-presets > button { height: 30px; padding-inline: 9px; font-size: 10px; }
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-quality { padding-top: 12px; }
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-quality-fields { gap: 10px; margin-top: 10px; }
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-funnel { min-height: 43px; margin: 0 16px 12px; padding: 9px 11px; font-size: 10px; }
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-panel > footer { padding: 11px 16px; }
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-panel > footer strong { font-size: 11px; }
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-panel > footer small { font-size: 9px; }
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-panel .sparkols-btn { padding: 7px 10px; font-size: 10px; }
@container (max-width: 980px) {
  body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-filter-grid { grid-template-columns: 78px minmax(0,1fr) minmax(0,1fr); }
  body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-platform-field { grid-column: 2/-1; }
  body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-quality { grid-column: 2/-1; }
}
@container (max-width: 680px) {
  body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-filter-grid { grid-template-columns: 1fr; }
  body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-filter-label,
  body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-field,
  body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-quality { grid-column: 1; }
}

/* 2026-07-28: automatic mail setup workspace */
body[data-sparkols-route="/mail/config"] #page-mail {
  background:
    radial-gradient(circle at 88% 2%, rgba(18,156,145,.08), transparent 28rem),
    #f4f7f9;
}
body[data-sparkols-route="/mail/config"] #mail-campaign-workbench {
  width: min(1320px, 100%);
  margin: 0 auto;
  padding: 12px 6px 28px;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-hero {
  align-items: center;
  margin-bottom: 18px;
  padding: 4px 2px;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-eyebrow,
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-section-kicker {
  display: block;
  margin-bottom: 6px;
  color: #0f8f84;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-hero h1 {
  color: #142033;
  font-size: 26px;
  line-height: 1.2;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-hero p {
  margin-top: 7px;
  color: #6c7b8f;
  font-size: 13px;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-save-state {
  min-height: 34px;
  padding: 0 14px;
  border-color: #d9e3e9;
  background: rgba(255,255,255,.86);
  box-shadow: 0 5px 18px rgba(15,23,42,.04);
  font-size: 11px;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-stepper {
  position: relative;
  width: min(720px,100%);
  margin: 0 0 16px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-stepper::before {
  content: "";
  position: absolute;
  top: 22px;
  left: 28px;
  right: 28px;
  height: 1px;
  background: #dbe4e9;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-stepper button {
  position: relative;
  gap: 11px;
  padding: 4px 16px 4px 0;
  border: 0;
  background: transparent;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-stepper button.is-active {
  background: transparent;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-stepper button > span {
  width: 38px;
  height: 38px;
  flex-basis: 38px;
  border: 4px solid #f4f7f9;
  background: #dfe7ec;
  color: #657487;
  box-shadow: 0 0 0 1px #d2dde4;
  font-size: 12px;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-stepper button.is-active > span {
  border-color: #f4f7f9;
  background: #0f9d91;
  box-shadow: 0 0 0 1px #0f9d91, 0 7px 18px rgba(15,157,145,.2);
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-stepper strong { font-size: 13px; }
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-stepper small { margin-top: 3px; font-size: 10px; }
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-readiness {
  display: grid;
  grid-template-columns: auto minmax(28px,1fr) auto minmax(28px,1fr) auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  padding: 13px 16px;
  border: 1px solid #e0e7ec;
  border-radius: 14px;
  background: rgba(255,255,255,.82);
  box-shadow: 0 10px 30px rgba(15,23,42,.035);
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-readiness > i {
  height: 1px;
  background: #e0e7ec;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-readiness-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 150px;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-readiness-icon {
  display: grid;
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  place-items: center;
  border-radius: 9px;
  background: #edf5f4;
  color: #0f8f84;
  font-size: 9px;
  font-weight: 850;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-readiness-item small,
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-readiness-item strong { display: block; }
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-readiness-item small { color: #8491a1; font-size: 9px; }
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-readiness-item strong { margin-top: 2px; color: #344256; font-size: 11px; }
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-readiness-item.is-missing .sparkols-mail-auto-readiness-icon {
  background: #fff1ed;
  color: #c2412d;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-readiness-item.is-missing strong { color: #b23b2a; }
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-readiness-item.is-ready .sparkols-mail-auto-readiness-icon {
  background: #e8f8f4;
  color: #078277;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-readiness-item.is-ready strong { color: #087b71; }
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-panel {
  overflow: visible;
  border: 1px solid #dfe7ec;
  border-radius: 16px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 16px 42px rgba(15,23,42,.055);
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-panel > header {
  padding: 20px 22px;
  border-bottom-color: #e8edf1;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-panel > header h2 {
  color: #172337;
  font-size: 19px;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-panel > header p {
  margin-top: 6px;
  font-size: 11px;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-form {
  grid-template-columns: minmax(0,1.45fr) minmax(300px,.72fr);
  gap: 14px;
  padding: 18px;
  background: #f8fafb;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-block {
  padding: 18px;
  border-color: #e0e7ec;
  border-radius: 13px;
  box-shadow: 0 5px 18px rgba(15,23,42,.025);
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-block-mailbox {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(280px,.7fr) minmax(480px,1.3fr);
  align-items: center;
  gap: 22px;
  border-color: #a9dcd6;
  background: linear-gradient(115deg,#effaf7 0%,#fff 58%);
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-block-mailbox.is-missing {
  border-color: #f0b8a8;
  background: linear-gradient(115deg,#fff5f1 0%,#fff 58%);
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-mailbox-intro {
  display: flex;
  align-items: center;
  gap: 14px;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-mailbox-symbol {
  display: grid;
  width: 43px;
  height: 43px;
  flex: 0 0 43px;
  place-items: center;
  border-radius: 12px;
  background: #dff4f0;
  color: #0b8a80;
  font-size: 18px;
  font-weight: 800;
}
body[data-sparkols-route="/mail/config"] .is-missing > .sparkols-mail-auto-mailbox-symbol,
body[data-sparkols-route="/mail/config"] .is-missing .sparkols-mail-auto-mailbox-symbol {
  background: #ffe6dd;
  color: #c34a32;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-mailbox-intro .sparkols-mail-auto-block-title {
  margin-bottom: 4px;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-inline-state {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 0 8px;
  border-radius: 99px;
  background: #fff0eb;
  color: #b83e2c;
  font-size: 9px;
  font-weight: 750;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-block-mailbox:not(.is-missing) .sparkols-mail-auto-inline-state {
  background: #e5f7f3;
  color: #087d73;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-block-title { margin-bottom: 16px; }
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-block-title > span {
  width: 29px;
  height: 29px;
  border-radius: 9px;
  background: #e8f5f3;
  color: #0d8c81;
  font-size: 9px;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-block-title strong { font-size: 13px; }
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-block-title small { margin-top: 3px; font-size: 10px; }
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-grid.four {
  grid-template-columns: repeat(2,minmax(0,1fr));
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-grid.two {
  grid-template-columns: 1fr;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-grid > label,
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-mailbox-row > label { font-size: 11px; }
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-grid input,
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-grid select,
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-mailbox-row select {
  height: 40px;
  border-color: #ccd8e0;
  border-radius: 9px;
  font-size: 12px;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-grid input:focus,
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-grid select:focus,
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-mailbox-row select:focus {
  outline: 3px solid rgba(15,157,145,.12);
  border-color: #0f9d91;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-mailbox-row {
  grid-template-columns: minmax(260px,1fr) auto auto;
  gap: 10px;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-weekdays,
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-platforms { gap: 8px; }
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-weekdays label,
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-platforms label {
  min-height: 31px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 10px;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-platforms {
  align-self: start;
  padding-top: 8px;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-status {
  grid-column: 1 / -1;
  padding: 11px 13px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 10px;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-status.is-error {
  border-color: #ffd7cc;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-panel > footer {
  padding: 14px 18px;
  border-top-color: #e4eaee;
  border-radius: 0 0 16px 16px;
  background: #fff;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-footer-label {
  display: block;
  margin-bottom: 3px;
  color: #8a96a6;
  font-size: 8px;
  font-weight: 750;
  letter-spacing: .06em;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-panel > footer strong { font-size: 12px; }
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-panel > footer small { font-size: 10px; }
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-panel .sparkols-btn {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 9px;
  font-size: 11px;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-panel .sparkols-btn:not(.sparkols-btn-secondary) {
  background: #0f9d91;
  border-color: #0f9d91;
  box-shadow: 0 7px 16px rgba(15,157,145,.16);
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-panel .sparkols-btn:not(.sparkols-btn-secondary):hover {
  background: #0b887e;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-step-two-mailbox-gate {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
  gap: 14px;
  margin: 18px;
  padding: 15px 16px;
  border: 1px solid #aadcd6;
  border-radius: 12px;
  background: #effaf7;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-step-two-mailbox-gate.is-missing {
  border-color: #f0b8a8;
  background: #fff5f1;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-step-two-mailbox-gate strong {
  display: block;
  color: #263448;
  font-size: 12px;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-step-two-mailbox-gate p {
  margin: 4px 0 0;
  color: #6c7b8f;
  font-size: 10px;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-step-two-mailbox-gate:not(.is-missing) button {
  display: none;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-template-summary {
  margin: 0 18px 16px;
  overflow: hidden;
  border-radius: 12px;
  background: #f8fafb;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-template-summary > div { padding: 14px 16px; }
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-template-summary span { font-size: 9px; }
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-template-summary strong { margin-top: 5px; font-size: 12px; }
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-template-mount { padding: 0 18px 18px; }
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-template-mount .sparkols-template-workbench {
  overflow: hidden;
  border-radius: 13px;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-workbench.is-configured-summary .sparkols-mail-auto-readiness {
  display: none;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-block-mailbox.is-attention {
  animation: sparkols-mail-auto-attention .7s ease both;
}
body.sparkols-mail-auto-prerequisite-open { overflow: hidden; }
body.sparkols-mailbox-setup-open { overflow: hidden; }
.sparkols-mail-auto-prerequisite-modal[hidden] { display: none !important; }
.sparkols-mail-auto-prerequisite-modal {
  position: fixed;
  inset: 0;
  z-index: 20010;
  display: grid;
  padding: 24px;
  place-items: center;
}
.sparkols-mail-auto-prerequisite-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(15,23,42,.5);
  backdrop-filter: blur(4px);
}
.sparkols-mail-auto-prerequisite-modal > section {
  position: relative;
  width: min(450px,calc(100vw - 32px));
  padding: 30px;
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 32px 90px rgba(15,23,42,.3);
  text-align: center;
  animation: sparkols-mail-auto-modal-in .2s ease-out both;
}
.sparkols-mail-auto-prerequisite-symbol {
  display: grid;
  width: 58px;
  height: 58px;
  margin: 0 auto 18px;
  place-items: center;
  border-radius: 17px;
  background: linear-gradient(135deg,#e4f8f4,#d5f1ec);
  color: #0d8c81;
  font-size: 24px;
  box-shadow: 0 9px 24px rgba(15,157,145,.16);
}
.sparkols-mail-auto-prerequisite-modal .sparkols-mail-auto-section-kicker { margin-bottom: 7px; }
.sparkols-mail-auto-prerequisite-modal h2 {
  margin: 0;
  color: #172337;
  font-size: 22px;
  letter-spacing: -.02em;
}
.sparkols-mail-auto-prerequisite-modal p {
  margin: 11px 0 24px;
  color: #657487;
  font-size: 13px;
  line-height: 1.75;
}
.sparkols-mail-auto-prerequisite-modal > section > div {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 10px;
}
.sparkols-mail-auto-prerequisite-modal .sparkols-btn {
  min-height: 42px;
  border-radius: 10px;
  font-size: 12px;
}
@keyframes sparkols-mail-auto-modal-in {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.sparkols-mailbox-setup-modal {
  position: fixed;
  inset: 0;
  z-index: 20012;
  display: grid;
  padding: 24px;
  place-items: center;
}
.sparkols-mailbox-setup-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(15,23,42,.54);
  backdrop-filter: blur(4px);
}
.sparkols-mailbox-setup-modal > section {
  position: relative;
  width: min(860px,calc(100vw - 32px));
  max-height: min(760px,calc(100vh - 40px));
  overflow: auto;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 18px;
  background: #f7f9fa;
  box-shadow: 0 34px 100px rgba(15,23,42,.34);
  animation: sparkols-mail-auto-modal-in .2s ease-out both;
}
.sparkols-mailbox-setup-modal > section > header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 21px 23px;
  border-bottom: 1px solid #e1e8ed;
  background: rgba(255,255,255,.96);
}
.sparkols-mailbox-setup-modal > section > header span {
  display: block;
  margin-bottom: 4px;
  color: #0f8f84;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
}
.sparkols-mailbox-setup-modal > section > header h2 {
  margin: 0;
  color: #172337;
  font-size: 20px;
}
.sparkols-mailbox-setup-modal > section > header p {
  margin: 5px 0 0;
  color: #718096;
  font-size: 11px;
}
.sparkols-mailbox-setup-close {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border: 1px solid #d9e2e8;
  border-radius: 9px;
  background: #fff;
  color: #526174;
  font-size: 21px;
  cursor: pointer;
}
.sparkols-mailbox-setup-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 18px 0;
  padding: 11px 13px;
  border: 1px solid #dfe7ec;
  border-radius: 9px;
  background: #fff;
  color: #64748b;
  font-size: 11px;
}
.sparkols-mailbox-setup-status.is-ready {
  border-color: #b8ded8;
  background: #edf9f6;
  color: #087d73;
}
.sparkols-mailbox-setup-status.is-warning {
  border-color: #f3c7b9;
  background: #fff5f1;
  color: #a8422f;
}
.sparkols-mailbox-setup-spinner {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  border: 2px solid #d9e5e8;
  border-top-color: #0f8f84;
  border-radius: 50%;
  animation: sparkols-spin .7s linear infinite;
}
.sparkols-mailbox-setup-status.is-ready .sparkols-mailbox-setup-spinner,
.sparkols-mailbox-setup-status.is-warning .sparkols-mailbox-setup-spinner {
  display: none;
}
.sparkols-mailbox-setup-existing {
  margin: 12px 18px 0;
  padding: 13px 14px;
  border: 1px solid #dce7e5;
  border-radius: 10px;
  background: #fff;
}
.sparkols-mailbox-setup-existing,
.sparkols-mailbox-setup-existing > div {
  display: flex;
  align-items: center;
}
.sparkols-mailbox-setup-existing {
  justify-content: space-between;
  gap: 14px;
}
.sparkols-mailbox-setup-existing[hidden] { display: none; }
.sparkols-mailbox-setup-existing > div { gap: 10px; min-width: 0; }
.sparkols-mailbox-setup-existing-check {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  place-items: center;
  border-radius: 50%;
  background: #e8f7f3;
  color: #0f8f84;
  font-size: 15px;
  font-weight: 800;
}
.sparkols-mailbox-setup-existing strong {
  display: block;
  color: #263448;
  font-size: 12px;
}
.sparkols-mailbox-setup-existing p {
  margin: 3px 0 0;
  color: #718096;
  font-size: 11px;
}
.sparkols-mailbox-setup-existing .btn { flex: 0 0 auto; }
.sparkols-mailbox-setup-body { padding: 16px 18px 18px; }
.sparkols-mailbox-setup-body #automailer-mailbox-config-panel {
  margin: 0 !important;
  padding: 18px !important;
  border-color: #dce5eb !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 24px rgba(15,23,42,.04);
}
@keyframes sparkols-mail-auto-attention {
  0%,100% { box-shadow: 0 5px 18px rgba(15,23,42,.025); }
  40% { box-shadow: 0 0 0 4px rgba(220,80,48,.14), 0 12px 28px rgba(15,23,42,.06); }
}
@media (max-width: 1100px) {
  body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-form { grid-template-columns: 1fr; }
  body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-block-mailbox { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  body[data-sparkols-route="/mail/config"] #mail-campaign-workbench { padding-inline: 0; }
  body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-readiness { grid-template-columns: 1fr; }
  body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-readiness > i { display: none; }
  body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-stepper { width: 100%; }
  body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-grid.four { grid-template-columns: 1fr; }
  body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-mailbox-row,
  body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-step-two-mailbox-gate { grid-template-columns: 1fr; }
  body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-step-two-mailbox-gate button { width: 100%; }
}

/* 2026-07-28: focused automatic-mail layout */
body[data-sparkols-route="/mail/config"] #mail-campaign-workbench {
  width: min(1180px, calc(100% - 32px));
  padding-top: 24px;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-hero {
  position: relative;
  margin-bottom: 16px;
  padding: 8px 4px 8px 18px;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-hero::before {
  content: "";
  position: absolute;
  inset: 9px auto 9px 0;
  width: 4px;
  border-radius: 99px;
  background: #0f9d91;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-stepper {
  width: 100%;
  margin-bottom: 12px;
  overflow: hidden;
  border: 1px solid #dfe7ec;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15,23,42,.04);
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-stepper::before { display: none; }
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-stepper button {
  min-height: 66px;
  padding: 12px 18px;
  border-right: 1px solid #e5ebef;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-stepper button:last-child { border-right: 0; }
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-stepper button.is-active { background: #edf9f6; }
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-stepper button > span {
  border-width: 0;
  background: #edf1f4;
  box-shadow: none;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-stepper button.is-active > span {
  border: 0;
  background: #0f9d91;
  box-shadow: 0 8px 20px rgba(15,157,145,.2);
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-readiness {
  margin-bottom: 18px;
  padding: 10px 12px;
  border-radius: 12px;
  box-shadow: none;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-readiness-item {
  min-width: 0;
  padding: 5px 8px;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-panel {
  border-radius: 18px;
  box-shadow: 0 22px 60px rgba(15,23,42,.08);
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-panel > header { padding: 22px 24px 18px; }
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-form {
  grid-template-columns: minmax(0,1fr) 330px;
  grid-template-rows: auto auto auto;
  gap: 16px;
  padding: 20px;
  background: #f6f8f9;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-block {
  padding: 20px;
  border-radius: 14px;
  box-shadow: 0 7px 22px rgba(15,23,42,.035);
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-block-mailbox {
  grid-column: 1;
  grid-row: 1;
  display: block;
  background: #fff;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-block-mailbox.is-missing { background: #fffaf8; }
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-mailbox-intro { margin-bottom: 18px; }
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-mailbox-row {
  grid-template-columns: minmax(220px,1fr) auto auto;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-block-primary {
  grid-column: 1;
  grid-row: 2;
  background: #fff;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-block-cadence {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: start;
  position: sticky;
  top: 18px;
  overflow: hidden;
  border-color: #173f3d;
  background: #173f3d;
  box-shadow: 0 18px 36px rgba(18,61,59,.2);
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-block-cadence .sparkols-mail-auto-block-title > span {
  background: rgba(88,220,199,.16);
  color: #82e0d1;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-block-cadence .sparkols-mail-auto-block-title strong { color: #fff; }
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-block-cadence .sparkols-mail-auto-block-title small,
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-block-cadence .sparkols-mail-auto-grid > label,
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-block-cadence .sparkols-mail-auto-grid > label > small,
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-block-cadence .sparkols-mail-auto-platforms > span {
  color: #bed3d0;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-block-cadence .sparkols-mail-auto-grid input {
  height: 48px;
  border-color: rgba(255,255,255,.14);
  background: rgba(255,255,255,.1);
  color: #fff;
  font-size: 17px;
  font-weight: 750;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-block-cadence .sparkols-mail-auto-platforms {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  gap: 8px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.12);
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-block-cadence .sparkols-mail-auto-platforms > span {
  grid-column: 1 / -1;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-block-cadence .sparkols-mail-auto-platforms label {
  min-height: 38px;
  justify-content: center;
  border-color: rgba(255,255,255,.16);
  background: rgba(255,255,255,.06);
  color: #d8e7e5;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-block-cadence .sparkols-mail-auto-platforms label:has(input:checked) {
  border-color: #73d7c7;
  background: #fff;
  color: #087d73;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-status {
  grid-column: 1 / -1;
  grid-row: 3;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-panel > footer { padding: 16px 20px; }
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-panel > footer .sparkols-btn:not(.sparkols-btn-secondary) {
  min-width: 150px;
  min-height: 42px;
}
@media (max-width: 1100px) {
  body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-form { grid-template-columns: 1fr; }
  body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-block-mailbox,
  body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-block-primary,
  body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-block-cadence,
  body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-status {
    grid-column: 1;
    grid-row: auto;
  }
  body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-block-cadence { position: static; }
}
@media (max-width: 760px) {
  body[data-sparkols-route="/mail/config"] #mail-campaign-workbench {
    width: calc(100% - 20px);
    padding-top: 14px;
  }
  body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-stepper button {
    min-height: 58px;
    padding: 10px;
  }
  body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-form { padding: 12px; }
}

/* 2026-07-28: ordered table-style automatic mail settings */
body[data-sparkols-route="/mail/config"] #mail-campaign-workbench {
  width: min(1080px, calc(100% - 32px));
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-legacy-stepper,
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-legacy-readiness {
  display: none !important;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-hero {
  margin-bottom: 20px;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-panel {
  overflow: hidden;
  border-color: #dfe7ec;
  background: #fff;
  box-shadow: 0 22px 62px rgba(15,23,42,.075);
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-table-head {
  padding: 24px 26px !important;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-table-progress {
  display: grid;
  min-width: 92px;
  justify-items: end;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-table-progress strong {
  color: #0b8d82;
  font-size: 22px;
  line-height: 1;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-table-progress span {
  margin-top: 5px;
  color: #8693a2;
  font-size: 10px;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-settings-table {
  display: block;
  padding: 0;
  background: #fff;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-table-row {
  border: 0;
  border-bottom: 1px solid #e7edf1;
  background: #fff;
  transition: background .18s ease;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-table-row:last-of-type {
  border-bottom: 0;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-table-row:hover {
  background: #fbfdfd;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-table-row.is-expanded {
  background: #fbfdfd;
  box-shadow: inset 3px 0 #129c91;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-table-row-trigger {
  display: grid;
  width: 100%;
  min-height: 78px;
  grid-template-columns: 40px minmax(230px,1fr) minmax(220px,auto) 20px;
  align-items: center;
  gap: 16px;
  padding: 15px 24px;
  border: 0;
  background: transparent;
  color: #1b2638;
  text-align: left;
}
body[data-sparkols-route="/mail/config"] button.sparkols-mail-auto-table-row-trigger {
  cursor: pointer;
}
body[data-sparkols-route="/mail/config"] button.sparkols-mail-auto-table-row-trigger:focus-visible {
  position: relative;
  z-index: 1;
  outline: 3px solid rgba(18,156,145,.18);
  outline-offset: -3px;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-table-check {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid #dbe4ea;
  border-radius: 10px;
  background: #f3f6f8;
  color: #718096;
  font-size: 10px;
  font-weight: 850;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-table-row.is-complete .sparkols-mail-auto-table-check {
  border-color: #13a090;
  border-radius: 50%;
  background: #13a090;
  color: #fff;
  font-size: 16px;
  box-shadow: 0 7px 18px rgba(19,160,144,.18);
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-table-row.is-missing .sparkols-mail-auto-table-check {
  border-color: #f2c2b5;
  background: #fff2ed;
  color: #bf4934;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-table-title strong,
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-table-title small {
  display: block;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-table-title strong {
  color: #233044;
  font-size: 14px;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-table-title small {
  margin-top: 5px;
  color: #8390a0;
  font-size: 10px;
  font-weight: 400;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-table-state {
  justify-self: end;
  overflow: hidden;
  max-width: 340px;
  color: #7a8798;
  font-size: 10px;
  font-weight: 650;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-table-row.is-complete .sparkols-mail-auto-table-state {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  padding: 0 9px;
  border-radius: 99px;
  background: #e9f8f4;
  color: #087d73;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-table-row.is-missing .sparkols-mail-auto-table-state {
  color: #bb4733;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-table-chevron {
  color: #91a0af;
  font-size: 17px;
  text-align: center;
  transition: transform .18s ease;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-table-row.is-expanded .sparkols-mail-auto-table-chevron {
  transform: rotate(180deg);
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-table-row-panel {
  display: none;
  padding: 4px 24px 24px 80px;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-table-row.is-expanded .sparkols-mail-auto-table-row-panel {
  display: block;
  animation: sparkols-mail-auto-table-open .18s ease-out both;
}
@keyframes sparkols-mail-auto-table-open {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-table-row-panel .sparkols-mail-auto-grid {
  padding: 18px;
  border: 1px solid #e3eaee;
  border-radius: 12px;
  background: #f8fafb;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-table-row-panel .sparkols-mail-auto-grid.four {
  grid-template-columns: repeat(2,minmax(0,1fr));
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-table-row-panel .sparkols-mail-auto-grid.two {
  grid-template-columns: minmax(220px,.55fr) minmax(0,1fr);
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-table-row-panel .sparkols-mail-auto-mailbox-row {
  padding: 18px;
  border: 1px solid #e3eaee;
  border-radius: 12px;
  background: #f8fafb;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-table-row-panel .sparkols-mail-auto-weekdays {
  margin-top: 10px;
  padding: 14px 16px 0;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-table-row-panel .sparkols-mail-auto-platforms {
  align-self: end;
  padding: 0;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-template-row .sparkols-mail-auto-table-row-trigger {
  grid-template-columns: 40px minmax(230px,1fr) minmax(160px,auto) auto;
  width: 100%;
  cursor: pointer;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-template-entry-action {
  display: inline-flex;
  min-width: 132px;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border-radius: 9px;
  background: #0f9f92;
  color: #fff;
  font-size: 11px;
  font-weight: 750;
  box-shadow: 0 8px 18px rgba(15,159,146,.14);
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-template-row .sparkols-mail-auto-table-row-trigger:hover {
  background: #f8fbfb;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-template-row .sparkols-mail-auto-table-row-trigger:hover .sparkols-mail-auto-template-entry-action {
  background: #0b8e83;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-template-row .sparkols-mail-auto-template-entry-action {
  min-width: 132px;
}
.sparkols-mail-template-inline-loading {
  display: flex;
  min-height: 92px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px;
  border: 1px solid #e4eaef;
  border-radius: 10px;
  background: #fbfcfd;
  color: #526174;
}
.sparkols-mail-template-inline-loading.is-compact {
  min-height: 58px;
  justify-content: flex-start;
  padding: 12px;
}
.sparkols-mail-template-inline-loading > span {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border: 2px solid #dce7e8;
  border-top-color: #0f9f92;
  border-radius: 50%;
  animation: sparkols-spin .75s linear infinite;
}
.sparkols-mail-template-inline-loading strong,
.sparkols-mail-template-inline-loading small { display: block; }
.sparkols-mail-template-inline-loading strong { color: #334155; font-size: 12px; }
.sparkols-mail-template-inline-loading small { margin-top: 3px; color: #8190a0; font-size: 10px; }
body[data-sparkols-route="/mail/config"] #mail-auto-step-one-footer > div:last-child {
  align-items: center;
}
body[data-sparkols-route="/mail/config"] #mail-auto-save-policy {
  min-width: 118px;
}
body[data-sparkols-route="/mail/config"] #mail-template-purpose-tabs {
  position: relative;
  z-index: 2;
  pointer-events: auto;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-settings-table > .sparkols-mail-auto-status {
  margin: 16px 24px;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-table-footer-hint {
  color: #8290a0;
  font-size: 10px;
}
@media (max-width: 820px) {
  body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-table-row-trigger,
  body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-template-row .sparkols-mail-auto-table-row-trigger {
    grid-template-columns: 36px minmax(0,1fr) auto;
    gap: 12px;
    padding: 14px 16px;
  }
  body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-table-state {
    grid-column: 2;
    justify-self: start;
    max-width: 100%;
    text-align: left;
  }
  body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-table-chevron,
  body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-template-row .sparkols-btn {
    grid-column: 3;
    grid-row: 1 / span 2;
  }
  body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-table-row-panel {
    padding: 2px 16px 18px;
  }
  body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-table-row-panel .sparkols-mail-auto-grid.four,
  body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-table-row-panel .sparkols-mail-auto-grid.two,
  body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-mailbox-row {
    grid-template-columns: 1fr;
  }
}

/* Quick-setup review: confirm directly or edit in place, then finish configuration. */
.sparkols-mail-quick-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 21020;
  display: grid;
  padding: 24px;
  place-items: center;
}

.sparkols-mail-quick-preview-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(25, 37, 52, .48);
  backdrop-filter: blur(3px);
}

.sparkols-mail-quick-preview-dialog {
  position: relative;
  display: flex;
  overflow: hidden;
  width: min(1120px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  flex-direction: column;
  border: 1px solid #dfe7ea;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(20, 34, 49, .22);
}

.sparkols-mail-quick-preview-dialog > header,
.sparkols-mail-quick-preview-dialog > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
}

.sparkols-mail-quick-preview-dialog > header { border-bottom: 1px solid #e6ecef; }
.sparkols-mail-quick-preview-dialog > footer { border-top: 1px solid #e6ecef; }
.sparkols-mail-quick-preview-dialog > header span { color: #118577; font-size: 10px; font-weight: 800; }
.sparkols-mail-quick-preview-dialog h2 { margin: 3px 0 0; color: #223044; font-size: 20px; }
.sparkols-mail-quick-preview-dialog header p { margin: 5px 0 0; color: #758195; font-size: 11px; }
.sparkols-mail-quick-preview-x { border: 0; background: transparent; color: #7d8999; font-size: 26px; cursor: pointer; }
.sparkols-mail-quick-preview-dialog > footer > span { color: #758195; font-size: 11px; }
.sparkols-mail-quick-preview-dialog > footer > div { display: flex; gap: 8px; }

.sparkols-mail-quick-preview-list {
  display: grid;
  overflow: auto;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 0;
  padding: 0 22px;
}

.sparkols-mail-quick-preview-card {
  min-width: 0;
  padding: 18px 18px 20px;
  border-bottom: 1px solid #e6ecef;
}

.sparkols-mail-quick-preview-card + .sparkols-mail-quick-preview-card { border-left: 1px solid #e6ecef; }
.sparkols-mail-quick-preview-card > div > span { display: inline-flex; padding: 4px 8px; border-radius: 999px; background: #eaf8f4; color: #118577; font-size: 10px; font-weight: 800; }
.sparkols-mail-quick-preview-card label { display: grid; gap: 6px; margin-top: 13px; color: #7a8798; font-size: 10px; }
.sparkols-mail-quick-preview-card input,
.sparkols-mail-quick-preview-card .sparkols-mail-quick-preview-body {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #2a3749;
  font: inherit;
  font-size: 12px;
  line-height: 1.65;
}
.sparkols-mail-quick-preview-card input { padding: 7px 0; font-weight: 700; }
.sparkols-mail-quick-preview-card .sparkols-mail-quick-preview-body {
  overflow: auto;
  min-height: 260px;
  max-height: 440px;
  padding: 8px 0;
  background: #fff;
  white-space: normal;
}
.sparkols-mail-quick-preview-card .sparkols-mail-quick-preview-body p:first-child { margin-top: 0; }
.sparkols-mail-quick-preview-card .sparkols-mail-quick-preview-body p:last-child { margin-bottom: 0; }
.sparkols-mail-quick-preview-card .sparkols-mail-quick-preview-body img { max-width: 100%; height: auto; }
.sparkols-mail-quick-preview-card .sparkols-mail-quick-preview-body a { color: #0b7f75; text-decoration: underline; }
.sparkols-mail-quick-preview-modal.is-editing .sparkols-mail-quick-preview-card input,
.sparkols-mail-quick-preview-modal.is-editing .sparkols-mail-quick-preview-card .sparkols-mail-quick-preview-body { padding: 8px 10px; border-color: #b8d9d5; background: #fbfefe; outline: 0; }
.sparkols-mail-quick-preview-modal.is-editing .sparkols-mail-quick-preview-card input:focus,
.sparkols-mail-quick-preview-modal.is-editing .sparkols-mail-quick-preview-card .sparkols-mail-quick-preview-body:focus { border-color: #15968a; box-shadow: 0 0 0 3px rgba(21, 150, 138, .1); }

/* Advanced template workbench: remove repeated step/status blocks and use flat rows rather than cards. */
.sparkols-mail-template-flat-view {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.sparkols-mail-template-flat-view > [hidden] { display: none !important; }
.sparkols-mail-template-flat-view .sparkols-mail-auto-template-mount { padding: 0; }
.sparkols-mail-template-flat-view #mail-template-config-panel.sparkols-template-workbench {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.sparkols-mail-template-flat-view .sparkols-template-workbench-head {
  padding: 4px 0 14px;
  border-bottom: 1px solid #dfe6ea;
}
.sparkols-mail-template-flat-view .sparkols-template-workbench-kicker,
.sparkols-mail-template-flat-view .sparkols-template-workbench-head p { display: none; }
.sparkols-mail-template-flat-view .sparkols-template-workbench-head .sparkols-mad-title { font-size: 18px; }
.sparkols-mail-template-flat-view .sparkols-template-purpose-tabs { padding: 8px 0; background: transparent; }
.sparkols-mail-template-flat-view .sparkols-template-workbench-body {
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 0;
  border-bottom: 1px solid #dfe6ea;
}
.sparkols-mail-template-flat-view .sparkols-template-group-rail { padding: 12px 12px 12px 0; background: transparent; }
.sparkols-mail-template-flat-view .sparkols-template-group-nav { gap: 0; border-top: 1px solid #e5ebee; }
.sparkols-mail-template-flat-view .sparkols-template-group-nav-item {
  border: 0;
  border-bottom: 1px solid #e5ebee;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.sparkols-mail-template-flat-view .sparkols-template-group-nav-item.is-active { background: #f1f9f7; }
.sparkols-mail-template-flat-view .sparkols-template-group-nav-item.is-active::before { top: 0; bottom: 0; }
.sparkols-mail-template-flat-view .sparkols-template-workbench-main { padding: 12px 0 20px 18px; background: transparent; }
.sparkols-mail-template-flat-view .sparkols-template-group-detail,
.sparkols-mail-template-flat-view .sparkols-template-library { border: 0; border-radius: 0; }
.sparkols-mail-template-flat-view .sparkols-template-group-detail { min-height: 0; }
.sparkols-mail-template-flat-view .sparkols-template-group-detail-head { padding: 10px 0 12px; }
.sparkols-mail-template-flat-view .sparkols-template-group-stats { background: transparent; }
.sparkols-mail-template-flat-view .sparkols-template-group-stats > div { padding: 10px 14px 10px 0; }
.sparkols-mail-template-flat-view .sparkols-template-group-members { gap: 0; padding: 0; border-top: 1px solid #e5ebee; }
.sparkols-mail-template-flat-view .sparkols-template-group-member { padding: 10px 6px; border: 0; border-bottom: 1px solid #e5ebee; border-radius: 0; }
.sparkols-mail-template-flat-view .sparkols-template-library { margin-top: 18px; border-top: 1px solid #dfe6ea; }
.sparkols-mail-template-flat-view .sparkols-template-library-head,
.sparkols-mail-template-flat-view .sparkols-template-library-source-head { padding-left: 0; padding-right: 0; background: transparent; }
.sparkols-mail-template-flat-view #mail-template-config-panel .sparkols-template-library-row { padding-left: 0; padding-right: 0; background: transparent; }

@media (max-width: 820px) {
  .sparkols-mail-quick-preview-modal { padding: 12px; }
  .sparkols-mail-quick-preview-dialog { width: calc(100vw - 24px); max-height: calc(100vh - 24px); }
  .sparkols-mail-quick-preview-list { grid-template-columns: minmax(0, 1fr); padding: 0 14px; }
  .sparkols-mail-quick-preview-card + .sparkols-mail-quick-preview-card { border-left: 0; }
  .sparkols-mail-quick-preview-dialog > header,
  .sparkols-mail-quick-preview-dialog > footer { align-items: stretch; flex-direction: column; }
  .sparkols-mail-template-flat-view .sparkols-template-workbench-body { grid-template-columns: minmax(0, 1fr); }
  .sparkols-mail-template-flat-view .sparkols-template-workbench-main { padding-left: 0; }
}

/* Finished state replaces the setup form after the preview is confirmed. */
.sparkols-mail-quick-complete[hidden] { display: none !important; }
.sparkols-mail-quick-setup.is-complete > .sparkols-mail-quick-head,
.sparkols-mail-quick-setup.is-complete > .sparkols-mail-quick-chat,
.sparkols-mail-quick-setup.is-complete > .sparkols-mail-quick-actionbar,
.sparkols-mail-quick-setup.is-complete > .sparkols-mail-quick-status,
.sparkols-mail-quick-setup.is-complete > .sparkols-mail-quick-result { display: none !important; }
.sparkols-mail-quick-complete {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px 18px;
  padding: 42px;
  border-radius: 16px;
  background: linear-gradient(135deg, #f0fbf8 0%, #fff 62%);
}
.sparkols-mail-quick-complete-mark { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 50%; background: #129589; color: #fff; font-size: 24px; font-weight: 800; }
.sparkols-mail-quick-complete-copy > span { color: #118577; font-size: 11px; font-weight: 800; }
.sparkols-mail-quick-complete-copy h2 { margin: 4px 0 0; color: #223044; font-size: 24px; }
.sparkols-mail-quick-complete-copy p { margin: 8px 0 0; color: #6f7e90; font-size: 12px; }
.sparkols-mail-quick-complete-summary { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 14px; border-top: 1px solid #dce9e6; border-bottom: 1px solid #dce9e6; }
.sparkols-mail-quick-complete-summary > div { min-width: 0; padding: 16px 18px 16px 0; border-bottom: 1px solid #edf3f1; }
.sparkols-mail-quick-complete-summary span,
.sparkols-mail-quick-complete-summary strong { display: block; }
.sparkols-mail-quick-complete-summary span { color: #7b8999; font-size: 10px; }
.sparkols-mail-quick-complete-summary strong { margin-top: 5px; color: #2b394b; font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; }
.sparkols-mail-quick-complete-saved-at { grid-column: 1 / -1; margin: -4px 0 0; color: #708092; font-size: 11px; }
.sparkols-mail-quick-complete footer { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.sparkols-mail-quick-complete footer a { text-decoration: none; }

@media (max-width: 820px) {
  .sparkols-mail-quick-complete { grid-template-columns: minmax(0, 1fr); padding: 24px; }
  .sparkols-mail-quick-complete-summary { grid-template-columns: minmax(0, 1fr); }
  .sparkols-mail-quick-complete footer { align-items: stretch; flex-direction: column; }
}

/* 2026-07-28: align the setup table with the neutral CRM UI palette */
body[data-sparkols-route="/mail/config"] #page-mail {
  background: #f4f6f8;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-campaign-hero::before {
  background: #d4dde4;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-eyebrow,
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-section-kicker {
  color: #667487;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-table-progress strong {
  color: #253247;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-table-row:hover,
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-table-row.is-expanded {
  background: #f8fafb;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-table-row.is-expanded {
  box-shadow: inset 3px 0 #c6d1d9;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-table-row.is-complete .sparkols-mail-auto-table-check {
  border-color: #129c91;
  background: #129c91;
  box-shadow: none;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-table-row.is-complete .sparkols-mail-auto-table-state {
  background: #f0f3f5;
  color: #536174;
}
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-table-row-panel .sparkols-mail-auto-grid,
body[data-sparkols-route="/mail/config"] .sparkols-mail-auto-table-row-panel .sparkols-mail-auto-mailbox-row {
  border-color: #e1e7eb;
  background: #f7f9fa;
}
.sparkols-mail-unconfigured-state {
  min-height: 210px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-sizing: border-box;
  padding: 32px 20px;
  border: 1px dashed #d8e2e8;
  border-radius: 10px;
  background: #fbfcfd;
  text-align: center;
}

.sparkols-mail-unconfigured-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #f2f8f6;
  color: #159a83;
  font-size: 19px;
}

.sparkols-mail-unconfigured-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sparkols-mail-unconfigured-copy strong {
  color: #1f2937;
  font-size: 17px;
}

.sparkols-mail-unconfigured-copy span {
  color: #7a8797;
  font-size: 12px;
}

.sparkols-mail-unconfigured-action {
  margin-top: 6px;
  text-decoration: none;
}

/* 2026-08-02: conversational first-outreach setup */
#mail-campaign-workbench[data-mail-quick-mode="true"] .sparkols-mail-auto-legacy-stepper,
#mail-campaign-workbench[data-mail-quick-mode="true"] .sparkols-mail-auto-legacy-readiness,
#mail-campaign-workbench[data-mail-quick-mode="true"] > .sparkols-mail-auto-legacy-config,
#mail-campaign-workbench[data-mail-quick-mode="true"] .sparkols-mail-campaign-hero {
  display: none !important;
}

#mail-campaign-workbench[data-mail-quick-mode="true"].is-advanced-template-open .sparkols-mail-quick-setup {
  display: none;
}

#mail-campaign-workbench[data-mail-quick-mode="true"].is-advanced-template-open > #mail-auto-step-two {
  display: block !important;
}

.sparkols-mail-quick-setup {
  overflow: hidden;
  border: 1px solid #dfe7ea;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(30, 55, 70, 0.05);
}

.sparkols-mail-quick-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 30px 24px;
  border-bottom: 1px solid #e7edef;
}

.sparkols-mail-quick-head > div:first-child > span,
.sparkols-mail-quick-result header span {
  display: block;
  margin-bottom: 6px;
  color: #159b8d;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.sparkols-mail-quick-head h2 {
  margin: 0;
  color: #1c2939;
  font-size: 23px;
  line-height: 1.35;
}

.sparkols-mail-quick-head p {
  max-width: 760px;
  margin: 8px 0 0;
  color: #718094;
  font-size: 13px;
  line-height: 1.65;
}

.sparkols-mail-quick-mailbox-state {
  flex: 0 0 auto;
  padding: 9px 13px;
  border: 1px solid #dbe4e8;
  border-radius: 999px;
  background: #f7f9fa;
  color: #667487;
  font-size: 12px;
  font-weight: 700;
}

.sparkols-mail-quick-mailbox-state.is-ready {
  border-color: #c8e9e2;
  background: #edf9f6;
  color: #118577;
}

.sparkols-mail-quick-mailbox-config {
  margin: 22px 30px 0;
  padding: 20px;
  border: 1px solid #dce8e6;
  border-radius: 14px;
  background: linear-gradient(135deg, #f8fcfb 0%, #fff 68%);
}

.sparkols-mail-quick-mailbox-title,
.sparkols-mail-quick-mailbox-channels,
.sparkols-mail-quick-channel,
.sparkols-mail-quick-smtp-actions {
  display: flex;
  align-items: center;
}

.sparkols-mail-quick-mailbox-title {
  justify-content: space-between;
  gap: 20px;
}

.sparkols-mail-quick-mailbox-title > div > span {
  display: block;
  margin-bottom: 4px;
  color: #159b8d;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.sparkols-mail-quick-mailbox-title h3 {
  margin: 0;
  color: #213044;
  font-size: 17px;
}

.sparkols-mail-quick-mailbox-title p,
.sparkols-mail-quick-channel p {
  margin: 5px 0 0;
  color: #748295;
  font-size: 12px;
  line-height: 1.55;
}

.sparkols-mail-quick-mailbox-channels {
  gap: 12px;
  margin-top: 16px;
}

.sparkols-mail-quick-channel {
  min-width: 0;
  flex: 1 1 0;
  justify-content: space-between;
  gap: 14px;
  min-height: 72px;
  box-sizing: border-box;
  padding: 13px 15px;
  border: 1px solid #dce6e9;
  border-radius: 11px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.sparkols-mail-quick-channel:hover,
.sparkols-mail-quick-channel.is-selected {
  border-color: #cce7e1;
  background: #f1faf7;
  box-shadow: 0 0 0 3px rgba(21, 155, 141, 0.08);
}

.sparkols-mail-quick-channel > input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #159b8d;
}

.sparkols-mail-quick-channel strong {
  color: #29384b;
  font-size: 13px;
}

.sparkols-mail-quick-channel.is-selected strong {
  color: #0f7f72;
}

.sparkols-mail-quick-channel-action {
  flex: 0 0 auto;
  padding: 7px 12px;
  border: 1px solid #d7e2e5;
  border-radius: 999px;
  background: #f7f9fa;
  color: #607084;
  font-size: 11px;
  font-weight: 800;
}

.sparkols-mail-quick-channel.is-selected .sparkols-mail-quick-channel-action {
  border-color: #9dd8ce;
  background: #dff5ef;
  color: #0f7f72;
}

.sparkols-mail-quick-channel.is-bound .sparkols-mail-quick-channel-action {
  border-color: #9dd8ce;
  background: #dff5ef;
  color: #0f7f72;
}

.sparkols-mail-quick-method-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid #d5e6e2;
  border-radius: 11px;
  background: #fff;
}

.sparkols-mail-quick-method-panel[hidden] {
  display: none;
}

.sparkols-mail-quick-method-panel > div > strong {
  color: #213044;
  font-size: 13px;
}

.sparkols-mail-quick-method-panel > div > p {
  margin: 5px 0 0;
  color: #748295;
  font-size: 12px;
}

.sparkols-mail-quick-method-panel.is-smtp {
  display: block;
}

.sparkols-mail-quick-method-panel.is-smtp[hidden] {
  display: none;
}

.sparkols-mail-quick-method-panel.is-api-key {
  display: block;
}

.sparkols-mail-quick-method-panel.is-api-key[hidden] {
  display: none;
}

.sparkols-mail-quick-api-key-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 8px 12px;
  align-items: end;
  padding: 0;
}

.sparkols-mail-quick-api-key-row label {
  display: grid;
  gap: 6px;
  color: #526174;
  font-size: 11px;
  font-weight: 700;
}

.sparkols-mail-quick-api-key-row input {
  width: 100%;
  height: 39px;
  box-sizing: border-box;
  padding: 0 52px 0 11px;
  border: 1px solid #d5e0e4;
  border-radius: 8px;
  background: #fff;
  color: #243246;
}

.sparkols-mail-quick-api-key-row > p {
  grid-column: 1 / -1;
  margin: 0;
  color: #748295;
  font-size: 11px;
}

.sparkols-mail-quick-channel-badge {
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 999px;
  background: #eef3f6;
  color: #657487;
  font-size: 10px;
  font-weight: 700;
}

.sparkols-mail-quick-smtp-form {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) 110px minmax(150px, 0.85fr) minmax(210px, 1.2fr);
  gap: 12px;
  margin-top: 14px;
  padding-top: 2px;
}

.sparkols-mail-quick-smtp-form > label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: #526174;
  font-size: 11px;
  font-weight: 700;
}

.sparkols-mail-quick-smtp-form input,
.sparkols-mail-quick-smtp-form select {
  width: 100%;
  height: 39px;
  box-sizing: border-box;
  padding: 0 11px;
  border: 1px solid #d5e0e4;
  border-radius: 8px;
  outline: none;
  background: #fff;
  color: #243246;
  font: inherit;
  font-size: 12px;
}

.sparkols-mail-quick-smtp-form input:focus,
.sparkols-mail-quick-smtp-form select:focus {
  border-color: #51b5a7;
  box-shadow: 0 0 0 3px rgba(21, 155, 141, 0.1);
}

.sparkols-mail-quick-password {
  position: relative;
  display: block;
}

.sparkols-mail-quick-password input {
  padding-right: 50px;
}

.sparkols-mail-quick-password button {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  padding: 4px 7px;
  border: 0;
  background: transparent;
  color: #118577;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.sparkols-mail-quick-smtp-actions {
  grid-column: 1 / -1;
  justify-content: flex-end;
  gap: 12px;
}

.sparkols-mail-quick-smtp-actions span {
  color: #748295;
  font-size: 11px;
}

.sparkols-mail-quick-smtp-actions span.is-error {
  color: #c2413b;
}

.sparkols-mail-quick-smtp-actions span.is-success {
  color: #118577;
  font-weight: 700;
}

@media (max-width: 1120px) {
  .sparkols-mail-quick-smtp-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .sparkols-mail-quick-head,
  .sparkols-mail-quick-mailbox-title,
  .sparkols-mail-quick-mailbox-channels {
    align-items: stretch;
    flex-direction: column;
  }

  .sparkols-mail-quick-mailbox-config {
    margin: 16px 16px 0;
    padding: 16px;
  }

  .sparkols-mail-quick-smtp-form {
    grid-template-columns: 1fr;
  }

  .sparkols-mail-quick-api-key-row {
    grid-template-columns: 1fr;
  }

  .sparkols-mail-quick-api-key-row > p {
    grid-column: 1;
  }

  .sparkols-mail-quick-smtp-actions {
    grid-column: 1;
    align-items: stretch;
    flex-direction: column;
  }
}

.sparkols-mail-quick-chat {
  display: grid;
  gap: 20px;
  padding: 28px 30px 22px;
  background: linear-gradient(180deg, #fbfcfd 0%, #fff 100%);
}

.sparkols-mail-quick-question {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: flex-start;
}

.sparkols-mail-quick-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #17212f;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.sparkols-mail-quick-bubble {
  max-width: 1040px;
  padding: 16px 18px;
  border: 1px solid #e1e8eb;
  border-radius: 4px 14px 14px 14px;
  background: #fff;
}

.sparkols-mail-quick-bubble > strong {
  color: #263346;
  font-size: 15px;
}

.sparkols-mail-quick-bubble > p {
  margin: 5px 0 13px;
  color: #7a8797;
  font-size: 12px;
}

.sparkols-mail-quick-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sparkols-mail-quick-options label {
  position: relative;
  cursor: pointer;
}

.sparkols-mail-quick-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.sparkols-mail-quick-options span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  padding: 7px 13px;
  border: 1px solid #d9e2e6;
  border-radius: 9px;
  background: #fff;
  color: #536174;
  font-size: 12px;
  font-weight: 700;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.sparkols-mail-quick-options input:checked + span {
  border-color: #57b9aa;
  background: #eaf8f4;
  color: #0e7f72;
  box-shadow: inset 0 0 0 1px rgba(21, 155, 141, 0.08);
}

.sparkols-mail-quick-options.is-multiple input:checked + span::before {
  content: "\2713";
  margin-right: 5px;
  font-weight: 900;
}

.sparkols-mail-quick-custom-time,
.sparkols-mail-quick-custom-limit,
.sparkols-mail-quick-custom-category {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.sparkols-mail-quick-custom-time[hidden],
.sparkols-mail-quick-custom-limit[hidden],
.sparkols-mail-quick-custom-category[hidden] {
  display: none;
}

.sparkols-mail-quick-custom-time label,
.sparkols-mail-quick-custom-limit label,
.sparkols-mail-quick-custom-category label {
  display: grid;
  gap: 5px;
  color: #718094;
  font-size: 11px;
  font-weight: 700;
}

.sparkols-mail-quick-custom-time input,
.sparkols-mail-quick-custom-limit input,
.sparkols-mail-quick-custom-category input {
  min-width: 150px;
  height: 36px;
  box-sizing: border-box;
  padding: 0 10px;
  border: 1px solid #d8e2e6;
  border-radius: 8px;
  background: #fff;
  color: #273447;
}

.sparkols-mail-quick-custom-category input {
  min-width: 300px;
}

.sparkols-mail-quick-actionbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 30px 22px 76px;
  padding: 16px 18px;
  border: 1px solid #dce7e7;
  border-radius: 12px;
  background: #f5faf9;
}

.sparkols-mail-quick-actionbar > div {
  display: grid;
  gap: 4px;
}

.sparkols-mail-quick-actionbar strong {
  color: #253247;
  font-size: 13px;
}

.sparkols-mail-quick-actionbar span {
  color: #7a8797;
  font-size: 11px;
}

.sparkols-mail-quick-actionbar .sparkols-btn {
  flex: 0 0 auto;
}

.sparkols-mail-quick-status {
  min-height: 0;
  margin: -8px 30px 20px 76px;
  color: #637286;
  font-size: 12px;
}

.sparkols-mail-quick-status.is-running {
  color: #1d7e72;
}

.sparkols-mail-quick-status.is-success {
  padding: 10px 12px;
  border-radius: 8px;
  background: #edf9f6;
  color: #118577;
}

.sparkols-mail-quick-status.is-error {
  color: #cf4f45;
}

.sparkols-mail-quick-result {
  margin: 0 30px 30px 76px;
  padding: 20px;
  border: 1px solid #dfe7ea;
  border-radius: 12px;
  background: #fff;
}

.sparkols-mail-quick-result[hidden] {
  display: none;
}

.sparkols-mail-quick-result > header,
.sparkols-mail-quick-result > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.sparkols-mail-quick-result h3 {
  margin: 0;
  color: #223044;
  font-size: 18px;
}

.sparkols-mail-quick-template-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.sparkols-mail-quick-template-preview article {
  display: grid;
  gap: 7px;
  padding: 14px;
  border: 1px solid #e2e8eb;
  border-radius: 10px;
  background: #fafcfc;
}

.sparkols-mail-quick-template-preview article > span {
  width: fit-content;
  padding: 3px 7px;
  border-radius: 999px;
  background: #eaf8f4;
  color: #118577;
  font-size: 10px;
  font-weight: 800;
}

.sparkols-mail-quick-template-preview strong {
  color: #2a3749;
  font-size: 13px;
}

.sparkols-mail-quick-template-preview p,
.sparkols-mail-quick-result footer > span {
  margin: 0;
  color: #788697;
  font-size: 11px;
  line-height: 1.55;
}

.sparkols-mail-quick-result footer > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

@media (max-width: 820px) {
  .sparkols-mail-quick-head,
  .sparkols-mail-quick-actionbar,
  .sparkols-mail-quick-result > header,
  .sparkols-mail-quick-result > footer {
    align-items: stretch;
    flex-direction: column;
  }
  .sparkols-mail-quick-head,
  .sparkols-mail-quick-chat {
    padding-left: 16px;
    padding-right: 16px;
  }
  .sparkols-mail-quick-actionbar,
  .sparkols-mail-quick-status,
  .sparkols-mail-quick-result {
    margin-left: 16px;
    margin-right: 16px;
  }
  .sparkols-mail-quick-question {
    grid-template-columns: 28px minmax(0, 1fr);
  }
  .sparkols-mail-quick-avatar {
    width: 28px;
    height: 28px;
  }
}
.sparkols-mail-template-standalone{display:block;max-width:1440px;margin:0 auto}.sparkols-mail-template-standalone-head{padding:4px 2px 18px;border-bottom:1px solid #e7edf3;margin-bottom:18px}.sparkols-mail-template-standalone-head span{display:block;color:#0f9d8c;font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.sparkols-mail-template-standalone-head h2{margin:5px 0 4px;color:#172033;font-size:26px}.sparkols-mail-template-standalone-head p{margin:0;color:#7b879b;font-size:13px}.sparkols-mail-template-standalone .sparkols-template-workbench{margin:0!important}.search-candidate-mail-modal{z-index:12500}.search-candidate-mail-card{width:min(760px,calc(100vw - 32px));max-height:min(780px,calc(100vh - 36px));display:flex;flex-direction:column}.search-candidate-mail-card .sparkols-modal-head>div{display:flex;flex-direction:column;gap:3px}.search-candidate-mail-card .sparkols-modal-head strong{font-size:18px;color:#172033}.search-candidate-mail-card .sparkols-modal-head span{font-size:12px;color:#8290a5;font-weight:500}.search-candidate-mail-body{padding:18px 20px;overflow:auto;min-height:220px}.search-candidate-mail-loading{height:220px;display:grid;place-items:center;color:#7b879b}.search-candidate-mail-mailbox{display:grid;grid-template-columns:96px minmax(0,1fr);align-items:center;gap:12px;padding:12px 14px;margin-bottom:14px;border:1px solid #e3eaf2;border-radius:10px;background:#f8fafc;color:#536176;font-size:13px;font-weight:700}.search-candidate-mail-template-list{display:flex;flex-direction:column;border:1px solid #e3eaf2;border-radius:12px;overflow:hidden}.search-candidate-mail-template{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center;padding:12px 14px;background:#fff;border-bottom:1px solid #edf1f5}.search-candidate-mail-template:last-child{border-bottom:0}.search-candidate-mail-template:has(input:checked){background:#effaf7;box-shadow:inset 3px 0 #129b87}.search-candidate-mail-template>label{display:grid;grid-template-columns:22px minmax(0,1fr);gap:10px;align-items:start;cursor:pointer}.search-candidate-mail-template input{margin-top:4px;accent-color:#129b87}.search-candidate-mail-template label>span{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 12px}.search-candidate-mail-template strong{color:#182235;font-size:14px}.search-candidate-mail-template small{grid-column:1;color:#68778d;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.search-candidate-mail-template em{grid-column:2;grid-row:1/3;align-self:center;font-style:normal;font-size:11px;font-weight:800;color:#178c7d;background:#e5f7f2;border-radius:999px;padding:5px 8px}.search-candidate-mail-template-edit{white-space:nowrap}.search-candidate-mail-empty{min-height:220px;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;gap:9px;border:1px dashed #cdd9e5;border-radius:12px;background:#fbfcfd;color:#718096}.search-candidate-mail-empty strong{font-size:17px;color:#273247}.search-candidate-mail-empty span{max-width:460px;font-size:13px}.search-candidate-mail-empty.is-error{border-color:#fecaca;background:#fff7f7}.search-candidate-mail-footer{display:flex;justify-content:flex-end;gap:9px;padding:14px 20px;border-top:1px solid #e7edf3;background:#fff}.sparkols-modal-open{overflow:hidden}@media(max-width:720px){.search-candidate-mail-card{width:calc(100vw - 18px)}.search-candidate-mail-mailbox{grid-template-columns:1fr}.search-candidate-mail-template>span{grid-template-columns:1fr}.search-candidate-mail-template em{grid-column:1;grid-row:auto;justify-self:start}.search-candidate-mail-footer{flex-wrap:wrap}.search-candidate-mail-footer .sparkols-btn{flex:1 1 auto}}

/* 2026-08-02 mail records: task-first queue dashboard */
.sparkols-mail-record-latest{padding:20px;border:1px solid #dfe7ef;border-radius:14px;background:linear-gradient(135deg,#fff 0%,#f6fbfa 100%)}
.sparkols-mail-record-latest-head{display:flex;justify-content:space-between;align-items:flex-start;gap:18px}.sparkols-mail-record-latest-head span{color:#149481;font-size:12px;font-weight:800;letter-spacing:.06em}.sparkols-mail-record-latest-head h3{margin:5px 0 4px;color:#172033;font-size:20px}.sparkols-mail-record-latest-head p{margin:0;color:#7a8799;font-size:12px}.sparkols-mail-record-status{display:inline-flex;align-items:center;width:max-content;padding:5px 9px;border-radius:999px;font-size:12px;font-weight:800;white-space:nowrap}.sparkols-mail-record-status.is-success{color:#087b65;background:#e3f7f0}.sparkols-mail-record-status.is-running{color:#1769aa;background:#e8f3ff}.sparkols-mail-record-status.is-danger{color:#c93636;background:#fff0f0}.sparkols-mail-record-status.is-queued{color:#8b6417;background:#fff7db}.sparkols-mail-record-progress{display:grid;grid-template-columns:minmax(0,1fr) 50px;align-items:center;gap:12px;margin:18px 0 12px}.sparkols-mail-record-progress>div{height:8px;border-radius:999px;background:#e7edf1;overflow:hidden}.sparkols-mail-record-progress i{display:block;height:100%;border-radius:inherit;background:#18a589}.sparkols-mail-record-progress strong{color:#203047;text-align:right}.sparkols-mail-record-metrics{display:grid;grid-template-columns:repeat(5,minmax(90px,1fr));border:1px solid #e4ebf1;border-radius:10px;background:#fff;overflow:hidden}.sparkols-mail-record-metrics span{padding:11px 13px;border-right:1px solid #e8edf2}.sparkols-mail-record-metrics span:last-child{border-right:0}.sparkols-mail-record-metrics small{display:block;color:#8591a2;font-size:11px}.sparkols-mail-record-metrics b{display:block;margin-top:3px;color:#1e2b3f;font-size:15px}.sparkols-mail-record-rule{margin:11px 0 0;color:#718095;font-size:12px}.sparkols-mail-record-recent{margin-top:14px;padding:16px;border:1px solid #e3e9ef;border-radius:12px;background:#fff}.sparkols-mail-record-title{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:0 0 12px;color:#263246}.sparkols-mail-record-title b{font-size:15px}.sparkols-mail-record-title span{color:#8995a6;font-size:12px}.sparkols-mail-record-recent td:first-child small{display:block;margin-top:3px;color:#8793a5;max-width:230px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sparkols-mail-record-empty{padding:26px;border:1px dashed #ced8e2;border-radius:12px;color:#778597;text-align:center;background:#fbfcfd}.sparkols-mail-record-task-table{min-width:1120px}.sparkols-mail-record-task-table td,.sparkols-mail-record-task-table th{white-space:nowrap}
.sparkols-mail-record-error{display:grid;gap:7px;margin-top:12px;padding:12px 14px;border:1px solid #ffd2d2;background:#fff5f5;color:#a62727}.sparkols-mail-record-error strong{font-size:13px}.sparkols-mail-record-error span{color:#70545a;font-size:12px}.sparkols-mail-record-error details{font-size:11px;color:#9b7378}.sparkols-mail-record-error summary{cursor:pointer}.sparkols-mail-record-error code{display:block;max-height:90px;overflow:auto;margin-top:5px;padding:7px;background:#fff;border:1px solid #f3d5d8;white-space:pre-wrap;word-break:break-word}.sparkols-mail-record-decision{display:inline-flex;align-items:center;margin-right:8px;padding:2px 7px;border-radius:999px;font-size:11px;font-style:normal;white-space:nowrap}.sparkols-mail-record-decision.is-wait{color:#8a6500;background:#fff2bd}.sparkols-mail-record-decision.is-retry{color:#067a68;background:#dcf8f1}.sparkols-mail-record-decision.is-dev{color:#a32f3b;background:#ffe0e3}.sparkols-mail-record-reason{min-width:280px;max-width:420px;white-space:normal!important}.sparkols-mail-record-reason b,.sparkols-mail-record-reason small{display:block}.sparkols-mail-record-reason b{color:#b82d2d;font-size:12px}.sparkols-mail-record-reason small{margin-top:6px;color:#7f6b70;line-height:1.5}.sparkols-mail-record-reason .sparkols-mail-record-decision{display:inline-flex}
@media(max-width:900px){.sparkols-mail-record-metrics{grid-template-columns:repeat(2,minmax(100px,1fr))}.sparkols-mail-record-metrics span{border-bottom:1px solid #e8edf2}.sparkols-mail-record-latest-head{flex-direction:column}.sparkols-mail-record-title{align-items:flex-start;flex-direction:column}}

/* 2026-08-02 mail records aggregate statistics */
.sparkols-mail-record-total{margin-bottom:14px;padding:17px;border:1px solid #dfe7ef;border-radius:14px;background:#fff}.sparkols-mail-record-total .sparkols-mail-record-title>div{display:flex;align-items:baseline;gap:10px}.sparkols-mail-record-total .sparkols-mail-record-title small{color:#8a96a7;font-size:11px;font-weight:500}.sparkols-mail-record-total-grid{display:grid;grid-template-columns:repeat(6,minmax(110px,1fr));gap:10px}.sparkols-mail-record-total-grid>div{min-height:76px;padding:13px 15px;border:1px solid #e1e8ef;border-radius:10px;background:#f9fbfc}.sparkols-mail-record-total-grid small{display:block;color:#7b889b;font-size:12px}.sparkols-mail-record-total-grid strong{display:block;margin-top:7px;color:#182235;font-size:24px;line-height:1}.sparkols-mail-record-total-grid>div:nth-child(2) strong{color:#11866f}.sparkols-mail-record-total-grid>div:nth-child(3) strong{color:#d04444}.sparkols-mail-record-total-grid>div:nth-child(4) strong{color:#3474b8}
@media(max-width:1100px){.sparkols-mail-record-total-grid{grid-template-columns:repeat(3,minmax(110px,1fr))}}@media(max-width:620px){.sparkols-mail-record-total-grid{grid-template-columns:repeat(2,minmax(100px,1fr))}.sparkols-mail-record-total .sparkols-mail-record-title>div{align-items:flex-start;flex-direction:column;gap:3px}}

/* 2026-08-02 mail records structural loading state */
@keyframes sparkolsMailRecordShimmer{0%{transform:translateX(-110%)}100%{transform:translateX(110%)}}
.sparkols-mail-record-loader{position:relative;overflow:hidden;padding:18px;border:1px solid #e1e8ee;border-radius:14px;background:#fff;isolation:isolate}
.sparkols-mail-record-loader::after{position:absolute;z-index:2;inset:0;content:"";pointer-events:none;transform:translateX(-110%);background:linear-gradient(100deg,transparent 26%,rgba(255,255,255,.78) 46%,rgba(255,255,255,.94) 51%,rgba(255,255,255,.78) 56%,transparent 74%);animation:sparkolsMailRecordShimmer 1.45s ease-in-out infinite}
.sparkols-mail-loader-line,.sparkols-mail-record-loader-kpis i,.sparkols-mail-record-loader-kpis b,.sparkols-mail-record-loader-pill,.sparkols-mail-record-loader-table i{display:block;border-radius:999px;background:#edf2f5}
.sparkols-mail-record-loader-head{display:flex;justify-content:space-between;align-items:center;gap:24px;margin-bottom:14px}.sparkols-mail-loader-line.is-title{width:112px;height:16px}.sparkols-mail-loader-line.is-meta{width:168px;height:10px}.sparkols-mail-record-loader-kpis{display:grid;grid-template-columns:repeat(6,minmax(100px,1fr));gap:10px}.sparkols-mail-record-loader-kpis>span{display:grid;gap:11px;min-height:76px;padding:14px;border:1px solid #e7edf1;border-radius:10px;background:#fafcfc}.sparkols-mail-record-loader-kpis i{width:48%;height:10px}.sparkols-mail-record-loader-kpis b{width:62%;height:23px;border-radius:7px;background:#e7edf1}.sparkols-mail-record-loader-main{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;margin-top:14px;padding:20px;border:1px solid #e4eaef;border-radius:14px;background:linear-gradient(135deg,#fff,#f8fbfa)}.sparkols-mail-record-loader-main>div{display:grid;gap:9px;width:min(520px,72%)}.sparkols-mail-loader-line.is-label{width:78px;height:9px}.sparkols-mail-loader-line.is-heading{width:58%;height:20px;border-radius:7px;background:#e7edf1}.sparkols-mail-loader-line.is-sub{width:82%;height:10px}.sparkols-mail-record-loader-pill{width:78px;height:28px;background:#e9f1ef}.sparkols-mail-record-loader-progress{height:7px;margin:16px 0 12px;border-radius:999px;background:#edf2f4;overflow:hidden}.sparkols-mail-record-loader-progress i{display:block;width:34%;height:100%;border-radius:inherit;background:#dceae6}.sparkols-mail-record-loader-table{overflow:hidden;border:1px solid #e7edf1;border-radius:10px}.sparkols-mail-record-loader-table>div{display:grid;grid-template-columns:1.35fr .72fr .85fr .8fr 1fr;gap:26px;padding:13px 15px;border-bottom:1px solid #edf1f4}.sparkols-mail-record-loader-table>div:last-child{border-bottom:0}.sparkols-mail-record-loader-table i{height:10px}.sparkols-mail-record-loader-table i:nth-child(2n){width:72%}
@media(max-width:1100px){.sparkols-mail-record-loader-kpis{grid-template-columns:repeat(3,minmax(100px,1fr))}}
@media(max-width:620px){.sparkols-mail-record-loader{padding:14px}.sparkols-mail-record-loader-head{align-items:flex-start;flex-direction:column;gap:8px}.sparkols-mail-record-loader-kpis{grid-template-columns:repeat(2,minmax(90px,1fr))}.sparkols-mail-record-loader-table>div{grid-template-columns:1.3fr .8fr .8fr}.sparkols-mail-record-loader-table i:nth-child(n+4){display:none}.sparkols-mail-record-loader-main{padding:16px}.sparkols-mail-record-loader-main>div{width:75%}}
@media(prefers-reduced-motion:reduce){.sparkols-mail-record-loader::after{animation:none;display:none}}

/* 2026-08-02 mail records: flat layout, date range and daily detail */
.sparkols-mail-record-page{padding:0;background:transparent;border:0;border-radius:0;box-shadow:none}
.sparkols-mail-record-page-head{padding:0 0 16px;border-bottom:1px solid #e2e8ee}.sparkols-mail-record-page-head>div{font-size:18px}.sparkols-mail-record-page-head p{margin:5px 0 0;font-size:12px}
.sparkols-mail-record-page .sparkols-mail-record-total{margin:0;padding:20px 0 22px;border:0;border-radius:0;background:transparent;border-bottom:1px solid #e2e8ee}
.sparkols-mail-record-page .sparkols-mail-record-total-grid{gap:0;border-top:1px solid #e3e9ee;border-bottom:1px solid #e3e9ee}
.sparkols-mail-record-page .sparkols-mail-record-total-grid>div{min-height:72px;padding:13px 18px;border:0;border-right:1px solid #e7ecf0;border-radius:0;background:transparent}
.sparkols-mail-record-page .sparkols-mail-record-total-grid>div:last-child{border-right:0}.sparkols-mail-record-page .sparkols-mail-record-total-grid strong{font-size:22px}
.sparkols-mail-record-range{position:relative;margin-left:auto}.sparkols-mail-record-range-popover{position:absolute;z-index:20;top:calc(100% + 8px);right:0;display:flex;align-items:end;gap:9px;width:max-content;padding:12px;border:1px solid #dce5eb;border-radius:10px;background:#fff;box-shadow:0 14px 35px rgba(42,57,70,.14)}.sparkols-mail-record-range-popover[hidden]{display:none}.sparkols-mail-record-range-popover label{display:grid;gap:5px;color:#7c8999;font-size:11px}.sparkols-mail-record-range-popover input{min-width:142px;height:34px;padding:0 9px;border:1px solid #d7e0e7;border-radius:7px;background:#fff;color:#253247;font:inherit}.sparkols-mail-record-range-popover>span{padding-bottom:9px;color:#96a1ae;font-size:11px}
.sparkols-mail-record-daily{padding-top:22px}.sparkols-mail-record-daily .sparkols-table{border-top:1px solid #e6ebef}.sparkols-mail-record-daily .sparkols-table th{background:transparent}.sparkols-mail-record-daily .sparkols-table td{height:43px}
.sparkols-mail-record-section{margin:0;padding:22px 0;border:0!important;border-radius:0!important;background:transparent!important;border-bottom:1px solid #e2e8ee!important;box-shadow:none!important}.sparkols-mail-record-section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:14px}.sparkols-mail-record-section-head b{color:#273448;font-size:15px}.sparkols-mail-record-section-head p{margin:4px 0 0;color:#7d8999;font-size:12px}
.sparkols-mail-record-bounce-kpis{display:grid;grid-template-columns:repeat(4,minmax(110px,1fr));margin-bottom:14px;border-top:1px solid #e5eaee;border-bottom:1px solid #e5eaee}.sparkols-mail-record-bounce-kpis>div{padding:12px 16px;border-right:1px solid #e8edf0}.sparkols-mail-record-bounce-kpis>div:last-child{border-right:0}.sparkols-mail-record-bounce-kpis span{display:block;color:#7b8898;font-size:11px}.sparkols-mail-record-bounce-kpis strong{display:block;margin-top:4px;color:#1f2b3e;font-size:18px}
.sparkols-mail-record-page .sparkols-mail-record-latest{padding:20px 0;border:0;border-radius:0;background:transparent;border-bottom:1px solid #e3e9ee}.sparkols-mail-record-page .sparkols-mail-record-metrics{border-radius:0;border-left:0;border-right:0;background:transparent}.sparkols-mail-record-page .sparkols-mail-record-recent{margin:0;padding:20px 0;border:0;border-radius:0;background:transparent}.sparkols-mail-record-page .sparkols-mail-record-empty{padding:25px 0;border:0;border-radius:0;background:transparent;text-align:left}
.sparkols-mail-record-page .sparkols-mail-record-loader{padding:20px 0;border:0;border-radius:0;background:transparent}
@media(max-width:900px){.sparkols-mail-record-range-popover{right:auto;left:0;align-items:stretch;flex-direction:column}.sparkols-mail-record-range-popover>span{display:none}.sparkols-mail-record-bounce-kpis{grid-template-columns:repeat(2,minmax(100px,1fr))}.sparkols-mail-record-bounce-kpis>div:nth-child(2){border-right:0}.sparkols-mail-record-bounce-kpis>div:nth-child(-n+2){border-bottom:1px solid #e8edf0}}
@media(max-width:620px){.sparkols-mail-record-page .sparkols-mail-record-total-grid>div:nth-child(2n){border-right:0}.sparkols-mail-record-page .sparkols-mail-record-total-grid>div:nth-child(-n+4){border-bottom:1px solid #e7ecf0}.sparkols-mail-record-page .sparkols-mail-record-title{gap:10px}.sparkols-mail-record-range{margin-left:0}}

/* 2026-08-02 template document preview, save feedback and notes */
.sparkols-mail-template-version-head{align-items:center}.sparkols-mail-template-version-actions{display:flex;align-items:center;gap:8px}.sparkols-mail-template-version-switch{display:inline-flex;padding:2px;border:1px solid #d6e1e9;border-radius:8px;background:#f2f5f7}.sparkols-mail-template-version-switch button{border:0;background:transparent;color:#69778b}.sparkols-mail-template-version-switch button.is-active{background:#fff;color:#087d73;box-shadow:0 1px 4px rgba(31,49,67,.12)}
.sparkols-mail-template-version-preview-heading{min-width:0}.sparkols-mail-template-version-preview-heading span{display:block;color:#0d8b7c;font-size:11px;font-weight:800}.sparkols-mail-template-version-preview-heading strong{display:block;max-width:620px;margin-top:3px;overflow:hidden;color:#233047;font-size:13px;text-overflow:ellipsis;white-space:nowrap}.sparkols-mail-template-version-fields{display:grid;grid-template-columns:minmax(150px,220px) minmax(260px,1fr);gap:12px}.sparkols-mail-template-version-frame{display:block;width:100%;height:300px;border:1px solid #dce5ec;border-radius:8px;background:#fff}.sparkols-mail-template-version[data-view-mode='preview'] .sparkols-mail-template-version-fields,.sparkols-mail-template-version[data-view-mode='preview'] .sparkols-mail-template-version-edit{display:none}.sparkols-mail-template-version[data-view-mode='edit'] .sparkols-mail-template-version-preview-heading,.sparkols-mail-template-version[data-view-mode='edit'] .sparkols-mail-template-version-preview{display:none}
.sparkols-mail-template-save-status{min-width:0;margin-right:auto;color:#718095;font-size:12px;overflow-wrap:anywhere}.sparkols-mail-template-save-status.is-success{color:#087d73}.sparkols-mail-template-save-status.is-error{color:#c23a3a}.sparkols-mail-template-note{max-width:700px;margin:3px 0 6px;overflow:hidden;color:#718095;font-size:10px;text-overflow:ellipsis;white-space:nowrap}.sparkols-mail-template-note b,.search-candidate-mail-template small b{color:#536176;font-weight:700}.search-candidate-mail-template small{display:block}
.search-candidate-mail-mapping-intro{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:0 0 14px;border-bottom:1px solid #e5ebf0}.search-candidate-mail-mapping-intro strong{color:#1b2739;font-size:15px}.search-candidate-mail-mapping-intro span{max-width:430px;color:#728095;font-size:12px;text-align:right}.search-candidate-mail-mapping{display:grid;margin-top:4px}.search-candidate-mail-mapping-row{display:grid;grid-template-columns:minmax(150px,.7fr) minmax(210px,1fr) minmax(210px,1fr);align-items:center;gap:12px;padding:12px 2px;border-bottom:1px solid #e8edf1}.search-candidate-mail-mapping-row code{color:#087d73;font-size:13px;font-weight:700}.search-candidate-mail-mapping-row select,.search-candidate-mail-mapping-row input{width:100%}.search-candidate-mail-mapping-row [hidden]{display:block!important;visibility:hidden}.search-candidate-mail-mapping-row [data-variable-fixed]:not([hidden]){visibility:visible}@media(max-width:720px){.search-candidate-mail-mapping-intro{flex-direction:column}.search-candidate-mail-mapping-intro span{text-align:left}.search-candidate-mail-mapping-row{grid-template-columns:minmax(0,1fr)}.search-candidate-mail-mapping-row [hidden]{display:none!important}}
@media(max-width:720px){.sparkols-mail-template-version-head{align-items:flex-start;flex-direction:column}.sparkols-mail-template-version-actions{width:100%;justify-content:space-between}.sparkols-mail-template-version-fields{grid-template-columns:minmax(0,1fr)}.sparkols-mail-template-version-frame{height:260px}.sparkols-template-editor-actions{align-items:stretch;flex-wrap:wrap}.sparkols-mail-template-save-status{width:100%}}

/* 2026-08-02 template preview layout and refresh correction */
.sparkols-mail-template-version{min-width:0;overflow:hidden}
.sparkols-mail-template-version-head{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:10px;min-height:58px}
.sparkols-mail-template-version-preview-heading{grid-column:1;min-width:0;padding-top:4px}
.sparkols-mail-template-version-preview-heading strong{max-width:100%}
.sparkols-mail-template-version-actions{grid-column:2;display:flex;width:auto;flex:0 0 auto;align-items:center;justify-content:flex-end;gap:8px;white-space:nowrap}
.sparkols-mail-template-version-actions button,.sparkols-mail-template-version-switch button{min-width:0;white-space:nowrap;writing-mode:horizontal-tb;word-break:keep-all}
.sparkols-mail-template-version-switch{display:grid;grid-template-columns:repeat(2,52px);flex:0 0 auto}
.sparkols-mail-template-version-switch button{height:32px;padding:0 10px}
.sparkols-mail-template-version-actions>.mt-version-remove{height:36px;padding:0 12px}
.sparkols-mail-template-version-fields{grid-template-columns:minmax(120px,.75fr) minmax(0,1.25fr);min-width:0}
.sparkols-mail-template-version-fields>label,.sparkols-mail-template-version-fields input,.sparkols-mail-template-version-fields select{min-width:0;max-width:100%;width:100%;box-sizing:border-box}
.sparkols-mail-template-version[data-view-mode='edit'] .sparkols-mail-template-version-preview-heading{display:block}
.sparkols-mail-template-version[data-view-mode='edit'] .sparkols-mail-template-version-preview{display:none}
@media(max-width:1180px){.sparkols-mail-template-version-list{grid-template-columns:repeat(2,minmax(360px,1fr))}}
@media(max-width:900px){.sparkols-mail-template-version-list{grid-template-columns:minmax(0,1fr)}}
@media(max-width:560px){.sparkols-mail-template-version-head{grid-template-columns:minmax(0,1fr)}.sparkols-mail-template-version-actions{grid-column:1;width:100%;justify-content:space-between}.sparkols-mail-template-version-fields{grid-template-columns:minmax(0,1fr)}}
