/* Stackposts-parity Social workspace (portal look) */
#uc-social-app {
  --sp-bg: #f4f6f8;
  --sp-surface: #ffffff;
  --sp-primary: #0f5f56;
  --sp-primary-hover: #0c4f48;
  --sp-primary-soft: #e7f5f2;
  --sp-primary-mid: #14a399;
  --sp-text: #111827;
  --sp-muted: #6b7280;
  --sp-subtle: #9ca3af;
  --sp-border: #e5e7eb;
  --sp-border-soft: #eef0f3;
  --sp-danger: #dc2626;
  --sp-warn-bg: #f8f1e3;
  --sp-warn-text: #8a6a2f;
  --sp-radius: 16px;
  --sp-radius-sm: 12px;
  --sp-radius-xs: 8px;
  --sp-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.04);
  --sp-font: Inter, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;

  display: none;
  position: fixed;
  top: 64px;
  right: 0;
  bottom: 0;
  left: var(--uc-meta-rail, 272px);
  z-index: 2400;
  background: var(--sp-bg);
  overflow: auto;
  font-family: var(--sp-font);
  color: var(--sp-text);
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

body.uc-page-social #uc-social-app {
  display: block;
}

body.uc-settings-open.uc-page-social #uc-social-app,
body.uc-connections-open.uc-page-social #uc-social-app {
  left: calc(var(--uc-meta-rail, 272px) + var(--uc-meta-settings, 240px));
}

body.uc-rail-collapsed.uc-page-social #uc-social-app {
  left: var(--uc-meta-rail-collapsed, 60px);
}

body.uc-rail-collapsed.uc-settings-open.uc-page-social #uc-social-app,
body.uc-rail-collapsed.uc-connections-open.uc-page-social #uc-social-app {
  left: calc(var(--uc-meta-rail-collapsed, 60px) + var(--uc-meta-settings, 240px));
}

.uc-social-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 28px 72px;
  box-sizing: border-box;
}

/* Page header */
.sp-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

/* Shared top bar already shows title/subtitle — hide duplicate chrome */
body.uc-has-page-title #uc-social-app .sp-page-head > div:first-child h1,
body.uc-has-page-title #uc-social-app .sp-page-head > div:first-child .sp-sub {
  display: none !important;
}

body.uc-has-page-title #uc-social-app .sp-page-head:not(:has(.sp-head-actions)) {
  display: none !important;
}

.sp-page-head h1 {
  margin: 0 0 6px;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--sp-text);
  line-height: 1.15;
}

.sp-page-head .sp-sub {
  margin: 0;
  color: var(--sp-muted);
  font-size: 14px;
  line-height: 1.45;
  max-width: 520px;
}

.sp-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex-shrink: 0;
}

/* Buttons */
.sp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  line-height: 1;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.sp-btn-primary {
  background: var(--sp-primary);
  color: #fff;
}

.sp-btn-primary:hover {
  background: var(--sp-primary-hover);
}

.sp-btn-secondary {
  background: #fff;
  color: var(--sp-text);
  border-color: var(--sp-border);
}

.sp-btn-secondary:hover {
  background: #f9fafb;
}

.sp-btn-ghost {
  background: transparent;
  color: var(--sp-muted);
  border-color: transparent;
}

.sp-btn-soft {
  background: var(--sp-primary-soft);
  color: var(--sp-primary);
}

.sp-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.sp-btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 10px;
}

/* KPI cards */
.sp-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.sp-kpi-grid.cols-6 {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.sp-kpi {
  background: var(--sp-surface);
  border: 1px solid var(--sp-border-soft);
  border-radius: var(--sp-radius);
  box-shadow: var(--sp-shadow);
  padding: 16px 16px 14px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: start;
  min-height: 92px;
}

.sp-kpi-ico {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.sp-kpi-ico.blue { background: #e8f0fe; color: #2563eb; }
.sp-kpi-ico.green { background: #e7f8ef; color: #059669; }
.sp-kpi-ico.orange { background: #fff1e7; color: #ea580c; }
.sp-kpi-ico.purple { background: #f1e8ff; color: #7c3aed; }
.sp-kpi-ico.teal { background: var(--sp-primary-soft); color: var(--sp-primary); }
.sp-kpi-ico.slate { background: #eef2f6; color: #475569; }

.sp-kpi-body .label {
  font-size: 13px;
  color: var(--sp-muted);
  font-weight: 500;
  margin-bottom: 4px;
}

.sp-kpi-body .value {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.sp-kpi-body .hint {
  margin-top: 4px;
  font-size: 12px;
  color: var(--sp-subtle);
}

.sp-kpi-spark {
  width: 72px;
  height: 36px;
  align-self: center;
  opacity: 0.9;
}

/* Section panels */
.sp-panel {
  background: var(--sp-surface);
  border: 1px solid var(--sp-border-soft);
  border-radius: var(--sp-radius);
  box-shadow: var(--sp-shadow);
  padding: 20px;
  margin-bottom: 18px;
}

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

.sp-panel-head h2 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.sp-panel-head p {
  margin: 0;
  color: var(--sp-muted);
  font-size: 13px;
}

/* Filters / search */
.sp-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.sp-pill {
  border: 1px solid var(--sp-border);
  background: #fff;
  color: var(--sp-muted);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

.sp-pill.active {
  background: var(--sp-primary-soft);
  border-color: #cdeadf;
  color: var(--sp-primary);
}

.sp-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.sp-search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--sp-border);
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--sp-subtle);
}

.sp-search input {
  border: 0;
  outline: 0;
  width: 100%;
  font: inherit;
  font-size: 13.5px;
  color: var(--sp-text);
  background: transparent;
}

.sp-select {
  border: 1px solid var(--sp-border);
  background: #fff;
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  font-size: 13px;
  color: var(--sp-text);
}

/* Channel / account cards */
.sp-channel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.sp-channel-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 148px;
}

.sp-channel-hit {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  border-radius: 10px;
}

.sp-channel-hit:hover .sp-channel-meta h3 {
  color: var(--sp-primary);
}

.sp-channel-hit:focus-visible {
  outline: 2px solid var(--sp-primary-mid);
  outline-offset: 2px;
}

.sp-channel-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  min-width: 0;
}

.sp-channel-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.sp-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: #e5e7eb;
  flex-shrink: 0;
}

.sp-avatar.ph {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  background: linear-gradient(135deg, #14a399, #0f5f56);
}

.sp-channel-meta {
  flex: 1;
  min-width: 0;
}

.sp-channel-meta h3 {
  margin: 0 0 2px;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sp-channel-meta .handle {
  margin: 0;
  font-size: 12.5px;
  color: var(--sp-muted);
}

.sp-check {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 20px;
  height: 20px;
  border: 1.5px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  flex-shrink: 0;
  padding: 0;
  cursor: pointer;
}
.sp-check.on {
  background: var(--sp-primary, #0d9488);
  border-color: var(--sp-primary, #0d9488);
  /* Keep position:absolute from .sp-check — relative here dropped the
     control into the card footer over "View insights". */
}
.sp-check.on::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.sp-channel-card.is-selected {
  border-color: #99d5cc;
  box-shadow: 0 0 0 1px #99d5cc;
}
.sp-channel-card.is-paused {
  opacity: 0.85;
}
.sp-channel-card.is-syncing {
  border-color: #93c5fd;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.12);
}
.sp-channel-card.is-syncing .sp-syncing-mark {
  display: inline-flex;
}
.sp-channel-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 600;
  color: var(--sp-muted);
}
.sp-channel-stats span {
  white-space: nowrap;
}

.sp-tool-btn {
  border: 1px solid var(--sp-border);
  background: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--sp-text);
  cursor: pointer;
  white-space: nowrap;
}
.sp-tool-btn:hover,
.sp-tool-btn.on {
  border-color: #cdeadf;
  background: var(--sp-primary-soft);
  color: var(--sp-primary);
}
.sp-tool-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.sp-view-toggle {
  display: inline-flex;
  border: 1px solid var(--sp-border);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.sp-view-toggle button {
  border: 0;
  background: transparent;
  width: 38px;
  height: 38px;
  cursor: pointer;
  color: var(--sp-muted);
  font-size: 14px;
}
.sp-view-toggle button.on {
  background: var(--sp-primary-soft);
  color: var(--sp-primary);
}
.sp-filter-drawer {
  display: none;
  flex-wrap: wrap;
  gap: 12px;
  margin: -4px 0 14px;
  padding: 12px 14px;
  background: #f8fafb;
  border: 1px solid var(--sp-border);
  border-radius: 12px;
}
.sp-filter-drawer:not([hidden]) {
  display: flex;
}
.sp-filter-drawer[hidden] {
  display: none !important;
}
.sp-filter-drawer label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--sp-muted);
}
.sp-filter-drawer select {
  border: 1px solid var(--sp-border);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  font-size: 13px;
  min-width: 160px;
  background: #fff;
}
.sp-bulkbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-bottom: 14px;
  padding: 10px 4px;
  font-size: 13px;
  color: var(--sp-muted);
}
.sp-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--sp-text);
  cursor: pointer;
}
.sp-switch input {
  accent-color: var(--sp-primary, #0d9488);
  width: 16px;
  height: 16px;
}
.sp-text-btn {
  border: 0;
  background: none;
  color: var(--sp-primary);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}
.sp-bulk-actions {
  margin-left: auto;
  position: relative;
}
.sp-menu-wrap {
  position: relative;
}
.sp-menu-pop {
  position: absolute;
  right: 0;
  bottom: calc(100% + 6px);
  min-width: 168px;
  background: #fff;
  border: 1px solid var(--sp-border);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 32, 0.12);
  padding: 6px;
  z-index: 40;
  display: none;
  flex-direction: column;
  gap: 2px;
}
.sp-menu-pop:not([hidden]) {
  display: flex;
}
.sp-menu-pop[hidden] {
  display: none !important;
}
.sp-bulk-pop {
  bottom: auto;
  top: calc(100% + 6px);
}
.sp-menu-pop button {
  border: 0;
  background: transparent;
  text-align: left;
  padding: 9px 10px;
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--sp-text);
  cursor: pointer;
}
.sp-menu-pop button:hover {
  background: #f3f6f8;
}
.sp-menu-pop button.danger {
  color: #dc2626;
}
.sp-channel-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sp-channel-list .sp-channel-card {
  min-height: 0;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}
.sp-channel-list .sp-channel-top {
  flex: 1;
  min-width: 200px;
}
.sp-channel-list .sp-channel-mid {
  flex: 0 0 auto;
  min-width: 180px;
}
.sp-channel-list .sp-channel-foot {
  margin-top: 0;
  padding-top: 0;
  min-width: 160px;
}

.sp-channel-mid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sp-net {
  font-size: 12.5px;
  color: var(--sp-muted);
  font-weight: 500;
}

.sp-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: #059669;
  font-weight: 600;
}

.sp-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
}

.sp-status.paused {
  color: #d97706;
}
.sp-status.paused::before {
  background: #f59e0b;
}

.sp-channel-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 4px;
}

.sp-channel-hit .sp-channel-top {
  padding-right: 28px;
}

.sp-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--sp-text);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
}

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

.sp-menu-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--sp-border);
  background: #fff;
  color: var(--sp-muted);
  cursor: pointer;
}

/* Publishing calendar */
.sp-cal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.sp-cal-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--sp-muted);
  text-transform: none;
  margin-bottom: 4px;
}

.sp-cal-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.sp-cal-title-row h1 {
  margin: 0;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.sp-seg {
  display: inline-flex;
  background: #fff;
  border: 1px solid var(--sp-border);
  border-radius: 12px;
  padding: 3px;
  gap: 2px;
}

.sp-seg button {
  border: 0;
  background: transparent;
  border-radius: 9px;
  padding: 8px 12px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--sp-muted);
  cursor: pointer;
}

.sp-seg button.active {
  background: var(--sp-primary-soft);
  color: var(--sp-primary);
}

.sp-cal-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  min-height: 520px;
}
.sp-cal-grid.sp-cal-view-week {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.sp-cal-grid.sp-cal-view-month {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  min-height: 0;
}
.sp-cal-grid.sp-cal-view-month .sp-cal-col {
  min-height: 110px;
  padding: 8px;
}
.sp-cal-grid.sp-cal-view-month .sp-cal-col.is-outside {
  opacity: 0.45;
  background: #f8fafc;
}
.sp-cal-grid.sp-cal-view-month .sp-cal-col.is-today {
  box-shadow: inset 0 0 0 2px #0a7a4b;
}
.sp-cal-grid.sp-cal-view-month .sp-cal-col-head .dow {
  font-size: 11px;
}
.sp-compose-sm {
  width: 28px;
  height: 28px;
  padding: 0;
  margin: 4px 0 6px;
  border-radius: 8px;
  font-size: 16px;
  line-height: 1;
}
.sp-month-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  margin: 0 0 4px;
  padding: 4px 6px;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
}
.sp-month-chip .sp-net-ico {
  flex-shrink: 0;
  transform: scale(0.85);
}
.sp-month-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sp-month-more {
  border: 0;
  background: transparent;
  color: var(--sp-muted);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 4px;
  cursor: pointer;
}
#uc-soc-cal-filters.on {
  border-color: #99d5cc;
  background: var(--sp-primary-soft);
  color: var(--sp-primary);
}
.sp-filters[hidden],
.sp-pub-filters[hidden],
#uc-soc-cal-filterbar[hidden] {
  display: none !important;
}

.sp-cal-col {
  background: #eef1f4;
  border-radius: 16px;
  padding: 12px 10px 14px;
  min-height: 520px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sp-cal-col-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  padding: 2px 4px 6px;
}

.sp-cal-col-date {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sp-cal-col-head .dow {
  font-size: 11px;
  color: var(--sp-muted);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sp-cal-col-head .dom {
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  color: var(--sp-ink, #0f172a);
}

.sp-cal-col-count {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--sp-muted);
  text-transform: uppercase;
  padding-top: 4px;
  white-space: nowrap;
}

.sp-cal-col.is-today .dom {
  color: var(--sp-primary);
}

.sp-cal-drop-zone {
  flex: 1;
  min-height: 0;
}

.sp-compose {
  width: 100%;
  border: 1.5px dashed #9fd0c7;
  background: #dff3ee;
  color: var(--sp-primary);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  margin-bottom: 10px;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.sp-cal-col.sp-drop-active .sp-compose {
  background: #0a7a4b;
  border-color: #0a7a4b;
  border-style: solid;
  color: #fff;
  box-shadow: 0 6px 16px rgba(10, 122, 75, 0.25);
}

.sp-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.sp-synced-post-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--sp-border);
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sp-synced-post-card.is-syncing,
.sp-posts-grid.is-syncing .sp-synced-post-card {
  border-color: #93c5fd;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.12);
}

.sp-syncing-mark {
  display: none;
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}

.sp-syncing-mark em {
  font-style: normal;
}

.sp-syncing-ico {
  display: inline-flex;
  width: 14px;
  height: 14px;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  animation: sp-spin 0.9s linear infinite;
}

.sp-synced-post-card.is-syncing .sp-syncing-mark,
.sp-posts-grid.is-syncing .sp-syncing-mark {
  display: inline-flex;
}

@keyframes sp-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.sp-post-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--sp-muted);
}

.sp-synced-post-card .sp-post-card-top strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--sp-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sp-post-when {
  margin: -2px 0 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--sp-muted);
}

.sp-media-type-chip {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f3f6f8;
  border: 1px solid var(--sp-border);
  font-size: 11px;
  font-weight: 700;
  color: var(--sp-muted);
  white-space: nowrap;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.2;
}
.sp-media-type-chip:hover {
  background: #e8eef3;
  color: var(--sp-ink);
}
button.sp-media-type-badge.alone {
  cursor: pointer;
  font-family: inherit;
}

.sp-post-media-btn,
.sp-post-media-preview {
  position: relative;
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
}
.sp-post-media-btn {
  cursor: pointer;
}
.sp-post-media-btn .sp-thumb,
.sp-post-media-preview .sp-thumb {
  display: block;
  width: 72px;
  height: 72px;
}
.sp-media-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.35);
  color: #fff;
  font-size: 18px;
  pointer-events: none;
}
.sp-media-type-badge {
  position: absolute;
  left: 6px;
  bottom: 6px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  pointer-events: none;
}
.sp-media-type-badge.alone {
  position: static;
  background: #f3f6f8;
  color: var(--sp-muted);
  border: 1px solid var(--sp-border);
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 11px;
}

.sp-media-lightbox {
  position: fixed;
  inset: 0;
  z-index: 4000;
  background: rgba(15, 23, 42, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.sp-media-lightbox-inner {
  width: min(920px, 100%);
  max-height: 90vh;
  background: #0f172a;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
}
.sp-media-lightbox-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: #111827;
  color: #fff;
}
.sp-media-lightbox-head .sp-modal-close {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
  background: transparent;
}
.sp-media-lightbox-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px;
  min-height: 200px;
  overflow: auto;
}
.sp-lightbox-img {
  max-width: 100%;
  max-height: 72vh;
  object-fit: contain;
  border-radius: 8px;
}
.sp-lightbox-video {
  width: 100%;
  max-height: 72vh;
  background: #000;
  border-radius: 8px;
}
.sp-lightbox-hint {
  margin: 10px 0 0;
  color: #cbd5e1;
  font-size: 13px;
  text-align: center;
}
.sp-media-lightbox-foot {
  padding: 10px 14px 14px;
  background: #111827;
}
.sp-media-lightbox-foot .sp-link {
  color: #93c5fd;
}

.sp-comments-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sp-comment {
  padding: 12px 14px;
  border: 1px solid var(--sp-border);
  border-radius: 12px;
  background: #fafbfc;
}
.sp-comment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.sp-comment-head strong {
  font-size: 13px;
}
.sp-comment-body {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--sp-text);
  white-space: pre-wrap;
}
.sp-comment-likes {
  display: inline-block;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--sp-muted);
}
a.sp-btn {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.sp-post-card,
.sp-sp-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.sp-post-card-top,
.sp-sp-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.sp-sp-card-idents {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.sp-net-ico {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  background: #111827;
  flex-shrink: 0;
}

.sp-net-ico.ig { background: linear-gradient(45deg, #f58529, #dd2a7b, #8134af); }
.sp-net-ico.fb { background: #111827; }
.sp-net-ico.yt { background: #ff0000; }
.sp-net-ico.li { background: #0a66c2; }

.sp-avatar.sp-avatar-xs,
.sp-avatar-xs {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.sp-avatar.sp-avatar-xs.ph,
.sp-avatar-xs.ph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e2e8f0;
  color: #475569;
  font-size: 10px;
  font-weight: 700;
}

.sp-time,
.sp-sp-card-time {
  margin-left: auto;
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
  white-space: nowrap;
}

.sp-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.sp-badge.pending {
  background: #e8f0fe;
  color: #1967d2;
}

.sp-badge.published {
  background: #e6f4ea;
  color: #13733e;
}

.sp-badge.failed {
  background: #fee2e2;
  color: #dc2626;
}

.sp-sp-card-main {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.sp-sp-card-copy {
  flex: 1;
  min-width: 0;
}

.sp-post-card h4,
.sp-sp-card-title {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.3;
  color: #1e293b;
  letter-spacing: -0.01em;
}

.sp-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 700;
  background: #e6f4ea;
  color: #13733e;
}

.sp-sp-card-tags,
.sp-post-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.sp-tag-muted {
  background: #f1f5f9;
  color: #475569;
}

.sp-post-card p,
.sp-sp-card-caption {
  margin: 0;
  font-size: 12.5px;
  color: #64748b;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sp-post-card-body {
  display: flex;
  gap: 10px;
}

.sp-sp-card-media {
  flex-shrink: 0;
}

.sp-thumb,
.sp-thumb-card {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
  background: #e5e7eb;
  flex-shrink: 0;
  display: block;
}

.sp-post-card-foot,
.sp-sp-card-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #edf0f3;
  position: relative;
}

.sp-sp-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #64748b;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
}

.sp-sp-icon-btn:hover {
  background: #f8fafc;
  color: #0f172a;
}

.sp-sp-main-btn {
  flex: 1;
  min-width: 0;
  height: 36px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #0f172a;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.sp-sp-main-btn:hover {
  background: #f8fafc;
}

.sp-sp-card-foot .sp-menu-wrap,
.sp-post-card-foot .sp-menu-wrap {
  margin-left: 0;
  flex-shrink: 0;
}

.sp-post-card-foot .sp-link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--sp-primary);
  cursor: pointer;
}
.sp-thumb-lg {
  width: 100%;
  height: auto;
  max-height: 280px;
  border-radius: 14px;
}
.sp-drawer.sp-cal-preview {
  width: min(720px, 100%);
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.sp-cal-preview-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 24px 28px 16px;
}
.sp-cal-preview .sp-cal-preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
  color: var(--sp-muted);
  font-size: 13px;
}
.sp-cal-preview-caption {
  white-space: pre-wrap;
  line-height: 1.5;
  color: var(--sp-text);
  font-size: 14px;
}
.sp-cal-preview-media {
  margin-bottom: 14px;
}
.sp-cal-preview-actions {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 28px 22px;
  border-top: 1px solid #e2e8f0;
  background: #fff;
}
.sp-cal-preview-actions .sp-composer-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
}
.sp-badge.cancelled {
  background: #fee2e2;
  color: #b91c1c;
}
.sp-post-card-clickable {
  cursor: pointer;
}
.sp-post-card-clickable:hover {
  border-color: #99d5cc;
  box-shadow: 0 0 0 1px #99d5cc;
}
.sp-post-card-foot .sp-link + .sp-link {
  margin-left: 12px;
}

/* Composer modal / drawer */
.sp-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  z-index: 2600;
  display: flex;
  justify-content: flex-end;
}

.sp-drawer {
  width: min(480px, 100%);
  height: 100%;
  background: #fff;
  box-shadow: -8px 0 32px rgba(15, 23, 42, 0.12);
  padding: 0;
  overflow: hidden;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.sp-drawer-head {
  flex-shrink: 0;
  padding: 24px 24px 8px;
}

.sp-drawer h2 {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 700;
}

.sp-composer-form {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.sp-composer-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 8px 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sp-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sp-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--sp-muted);
}

.sp-form input,
.sp-form textarea,
.sp-form select {
  border: 1px solid var(--sp-border);
  border-radius: 12px;
  padding: 11px 12px;
  font: inherit;
  font-size: 14px;
  color: var(--sp-text);
  background: #fff;
}

.sp-form textarea {
  min-height: 120px;
  resize: vertical;
}

.sp-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sp-field-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--sp-muted);
}

.sp-field-help {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--sp-subtle);
  line-height: 1.4;
}

/* Account search + select */
.sp-acc-picker {
  border: 1px solid var(--sp-border);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.sp-acc-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--sp-border-soft);
  color: var(--sp-subtle);
}

.sp-acc-search input {
  border: 0 !important;
  outline: 0;
  width: 100%;
  padding: 0 !important;
  font: inherit;
  font-size: 13.5px;
  background: transparent;
}

.sp-acc-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 10px;
}

.sp-acc-selected:not(:empty) {
  padding: 10px;
  border-bottom: 1px solid var(--sp-border-soft);
}

.sp-acc-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #cdeadf;
  background: var(--sp-primary-soft);
  color: var(--sp-primary);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

.sp-acc-chip span {
  opacity: 0.7;
}

.sp-acc-list {
  max-height: 200px;
  overflow: auto;
}

.sp-acc-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 10px 12px;
  cursor: pointer;
  font-family: inherit;
  color: var(--sp-text);
}

.sp-acc-option:hover {
  background: #f3faf8;
}

.sp-acc-option .sp-avatar {
  width: 32px;
  height: 32px;
  font-size: 12px;
}

.sp-acc-option span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.sp-acc-option strong {
  font-size: 13.5px;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sp-acc-option small {
  font-size: 12px;
  color: var(--sp-muted);
}

.sp-acc-empty {
  padding: 16px;
  text-align: center;
  color: var(--sp-muted);
  font-size: 13px;
}

.sp-acc-hint {
  padding: 8px 12px;
  font-size: 12px;
  color: var(--sp-subtle);
  border-top: 1px solid var(--sp-border-soft);
  background: #fafbfc;
}

/* Media type pills */
.sp-media-types {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sp-media-type {
  border: 1px solid var(--sp-border);
  background: #fff;
  color: var(--sp-muted);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

.sp-media-type.active {
  background: var(--sp-primary-soft);
  border-color: #cdeadf;
  color: var(--sp-primary);
}

.sp-carousel-urls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}

.sp-carousel-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.sp-carousel-row .sp-slide-url {
  flex: 1;
  border: 1px solid var(--sp-border);
  border-radius: 12px;
  padding: 11px 12px;
  font: inherit;
  font-size: 14px;
}

.sp-carousel-row .sp-slide-type.sp-select {
  width: 110px;
  flex-shrink: 0;
}

/* Drag & drop upload */
.sp-dropzone {
  border: 1.5px dashed #b7c9c5;
  background: #f3faf8;
  border-radius: 14px;
  padding: 22px 16px;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  color: var(--sp-muted);
}

.sp-dropzone strong {
  display: block;
  color: var(--sp-primary);
  font-size: 14px;
  margin-bottom: 4px;
}

.sp-dropzone p {
  margin: 0;
  font-size: 12.5px;
}

.sp-dropzone-ico {
  width: 42px;
  height: 42px;
  margin: 0 auto 10px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #d7e6e2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--sp-primary);
}

.sp-dropzone.is-dragover,
.sp-dropzone:hover {
  background: #e7f5f2;
  border-color: var(--sp-primary-mid);
}

.sp-dropzone.is-uploading {
  opacity: 0.7;
  pointer-events: none;
}

.sp-media-previews {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.sp-media-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--sp-border);
  border-radius: 12px;
  padding: 8px;
  background: #fff;
}

.sp-media-preview-img {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
  background: #e8eef2;
  flex-shrink: 0;
}

.sp-media-preview-video {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: #111827;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.sp-media-preview-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sp-media-preview-meta strong {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sp-media-preview-meta small {
  font-size: 11px;
  color: var(--sp-subtle);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sp-url-fallback {
  margin-top: 10px;
  border: 1px solid var(--sp-border-soft);
  border-radius: 12px;
  padding: 8px 12px;
  background: #fafbfc;
}

.sp-url-fallback summary {
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--sp-muted);
}

.sp-url-fallback[open] summary {
  margin-bottom: 8px;
}

.sp-url-fallback input[type="url"] {
  width: 100%;
  border: 1px solid var(--sp-border);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  font-size: 13.5px;
  box-sizing: border-box;
}

/* Calendar DnD polish */
.sp-cal-col {
  position: relative;
}

.sp-cal-col.sp-drop-active {
  outline: 2px solid var(--sp-primary-mid);
  outline-offset: -2px;
  background: #e7f5f2;
}

.sp-cal-drop-hint {
  display: none;
  font-size: 11px;
  color: var(--sp-primary);
  font-weight: 600;
  text-align: center;
  padding: 6px;
  margin-bottom: 8px;
}

.sp-cal-col.sp-drop-active .sp-cal-drop-hint {
  display: block;
}

.sp-cal-grid.is-dragging .sp-compose {
  border-color: #0a7a4b;
  background: #cfeedf;
}

.sp-cal-grid.is-dragging .sp-cal-col:not(.sp-drop-active) .sp-compose::after {
  content: none;
}

.sp-cal-empty {
  text-align: center;
  color: var(--sp-subtle);
  font-size: 12px;
  padding: 18px 8px;
}

.sp-post-card.sp-draggable {
  cursor: grab;
}

.sp-post-card.dragging {
  opacity: 0.45;
  cursor: grabbing;
}

.sp-drag-hint {
  color: var(--sp-subtle);
  font-size: 12px;
  letter-spacing: -1px;
  user-select: none;
}

.sp-compose {
  margin-bottom: 8px;
}

.sp-checks {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sp-checks label {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: var(--sp-text);
  font-size: 13.5px;
}

/* RSS feed cards */
.sp-feed-card {
  background: #fff;
  border: 1px solid var(--sp-border);
  border-radius: var(--sp-radius);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--sp-shadow);
}

.sp-feed-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.sp-feed-ico {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #eef2f6;
  color: var(--sp-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.sp-feed-top h3 {
  margin: 0 0 2px;
  font-size: 16px;
  font-weight: 700;
}

.sp-feed-top .url {
  margin: 0;
  font-size: 12.5px;
  color: var(--sp-muted);
}

.sp-feed-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

.sp-feed-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.sp-feed-grid .lbl {
  font-size: 12px;
  color: var(--sp-muted);
  margin-bottom: 6px;
  font-weight: 600;
}

.sp-feed-grid .val {
  font-size: 14px;
  font-weight: 600;
}

.sp-days {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.sp-day {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  background: #eef2f6;
  color: var(--sp-muted);
}

.sp-day.on {
  background: var(--sp-primary);
  color: #fff;
}

.sp-warn {
  background: var(--sp-warn-bg);
  color: var(--sp-warn-text);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  margin-bottom: 14px;
}

.sp-feed-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.sp-stats-inline {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--sp-muted);
}

.sp-stats-inline strong {
  color: var(--sp-text);
  font-weight: 700;
}

/* Empty / msg */
.sp-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--sp-muted);
  border: 1px dashed var(--sp-border);
  border-radius: var(--sp-radius);
  background: #fff;
}

.sp-msg {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--sp-primary-soft);
  color: var(--sp-primary);
  font-size: 13px;
  font-weight: 600;
}

.sp-msg.err {
  background: #fee2e2;
  color: var(--sp-danger);
}

.sp-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: var(--sp-radius);
  overflow: hidden;
  border: 1px solid var(--sp-border);
}

.sp-table th,
.sp-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--sp-border-soft);
  font-size: 13px;
  vertical-align: middle;
}

.sp-table th {
  color: var(--sp-muted);
  font-weight: 600;
  background: #fafbfc;
  font-size: 12px;
}

/* ── treg connect modal ───────────────────────────────── */
.sp-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  background: rgba(15, 23, 32, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.sp-modal {
  width: min(520px, 100%);
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(15, 23, 32, 0.18);
  overflow: hidden;
}
.sp-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 0;
}
.sp-modal-head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 650;
  color: #0f1720;
}
.sp-modal-close {
  border: 0;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: #64748b;
}
.sp-treg-lead,
.sp-treg-modal .sp-muted {
  margin: 8px 20px 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
}
.sp-treg-modal #uc-treg-body {
  padding: 16px 20px 8px;
}
.sp-treg-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.sp-treg-list h4 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}
.sp-treg-conn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid #eef2f6;
  font-size: 13px;
}
.sp-treg-token {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}
.sp-treg-token input {
  border: 1px solid #d7dee7;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 400;
}
.sp-treg-msg {
  min-height: 18px;
  margin-top: 10px;
  font-size: 12px;
  color: #64748b;
}
.sp-treg-msg.ok {
  color: #0f766e;
}
.sp-treg-msg.err {
  color: #b91c1c;
}
.sp-modal-foot {
  padding: 8px 20px 18px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.sp-btn-sm {
  padding: 6px 10px !important;
  font-size: 12px !important;
}

@media (max-width: 1200px) {
  .sp-kpi-grid,
  .sp-kpi-grid.cols-6 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .sp-channel-grid,
  .sp-cal-grid:not(.sp-cal-view-month):not(.sp-cal-view-week),
  .sp-feed-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sp-cal-grid.sp-cal-view-week,
  .sp-cal-grid.sp-cal-view-month {
    grid-template-columns: repeat(7, minmax(140px, 1fr));
    overflow-x: auto;
  }
}

@media (max-width: 900px) {
  body.uc-page-social #uc-social-app {
    left: 0 !important;
  }
  .uc-social-inner {
    padding: 18px 14px 56px;
  }
  .sp-page-head {
    flex-direction: column;
  }
  .sp-kpi-grid,
  .sp-kpi-grid.cols-6,
  .sp-channel-grid,
  .sp-cal-grid,
  .sp-feed-grid {
    grid-template-columns: 1fr;
  }
}

/* Publishing sub-nav + queue/labels/campaigns */
.sp-pub-subnav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  padding: 10px 12px;
  border: 1px solid var(--sp-border);
  border-radius: 14px;
  background: #fff;
}
.sp-pub-tab {
  border: 0;
  background: transparent;
  color: var(--sp-muted);
  font: inherit;
  font-weight: 700;
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.sp-pub-tab:hover { color: var(--sp-ink); background: #f3f6f8; }
.sp-pub-tab.active {
  background: #0f172a;
  color: #fff;
}
.sp-pub-new { margin-left: auto; }
.sp-pub-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}
.sp-pub-filters select,
.sp-form-row select[multiple] {
  min-height: 38px;
  border: 1px solid var(--sp-border);
  border-radius: 10px;
  padding: 8px 10px;
  background: #fff;
  font: inherit;
}
.sp-queue-bulk {
  justify-content: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}
.sp-table-wrap { overflow: auto; }
.sp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.sp-table th,
.sp-table td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid #eef2f6;
  vertical-align: top;
}
.sp-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--sp-muted);
}
.sp-queue-channel {
  display: flex;
  gap: 8px;
  align-items: center;
}
.sp-queue-channel small.sp-net-pill,
.sp-net-pill {
  display: inline-block;
  margin-top: 2px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--sp-muted);
}
.sp-queue-post p {
  margin: 4px 0 8px;
  color: var(--sp-muted);
}
.sp-queue-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.sp-queue-meta .sp-thumb {
  width: 40px;
  height: 40px;
}
.sp-queue-when small {
  display: block;
  color: var(--sp-muted);
  margin-top: 2px;
}
.sp-queue-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.sp-badge.draft { background: #eef2ff; color: #3730a3; }
.sp-badge.processing { background: #f3e8ff; color: #6b21a8; }
.sp-labels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.sp-label-card {
  display: flex;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--sp-border);
  border-radius: 14px;
  background: #fff;
}
.sp-label-swatch {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  margin-top: 4px;
  flex-shrink: 0;
}
.sp-label-card p {
  margin: 6px 0;
  color: var(--sp-muted);
  font-size: 13px;
}
.sp-label-form { margin-top: 16px; }
.sp-label-form[hidden] { display: none !important; }
.sp-err-inline {
  display: block;
  color: #b91c1c;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sp-queue-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.sp-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.sp-drawer-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sp-muted);
  margin-bottom: 4px;
}
.sp-composer-actions {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 14px 24px 20px;
  border-top: 1px solid var(--sp-border);
  background: #fff;
  box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.04);
}
.sp-composer-actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.sp-composer-actions-row .sp-btn,
.sp-composer-publish {
  width: 100%;
}
.sp-composer-hint {
  margin: 0;
  font-size: 12px;
  color: var(--sp-muted);
  line-height: 1.4;
}
/* Instagram-style insight matrix */
.sp-mx {
  margin: 16px 0 20px;
}
.sp-mx-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--sp-muted);
  margin: 0 0 10px;
}
.sp-mx-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.sp-mx-card {
  background: #fff;
  border: 1px solid var(--sp-border);
  border-radius: 16px;
  padding: 16px 16px 12px;
}
.sp-mx-card header h3 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
}
.sp-mx-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 7px 0;
  border-top: 1px solid var(--sp-border-soft, #eef2f6);
  font-size: 13px;
  color: var(--sp-muted);
}
.sp-mx-row:first-of-type {
  border-top: 0;
  padding-top: 0;
}
.sp-mx-row.strong {
  color: var(--sp-text);
  font-size: 14px;
}
.sp-mx-row strong {
  color: var(--sp-text);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.sp-mx-split {
  margin: 4px 0 10px;
}
.sp-mx-split-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  color: var(--sp-muted);
  margin-bottom: 6px;
}
.sp-mx-bar {
  display: flex;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: #eceff3;
}
.sp-mx-bar i {
  display: block;
  height: 100%;
  background: #e1306c;
}
.sp-mx-bar b {
  display: block;
  height: 100%;
  background: #7c3aed;
}
.sp-mx-note {
  margin: 6px 0 8px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--sp-muted);
}
.sp-mx-foot {
  margin: 10px 2px 0;
  font-size: 12px;
  color: var(--sp-muted);
}
@media (max-width: 900px) {
  .sp-form-row { grid-template-columns: 1fr; }
  .sp-pub-new { margin-left: 0; width: 100%; }
  .sp-mx-grid { grid-template-columns: 1fr; }
}
