:root {
  color-scheme: light;
  --bg: #edf1f5;
  --panel: #ffffff;
  --ink: #121926;
  --muted: #667085;
  --line: #d8e0e8;
  --brand: #155e75;
  --brand-2: #0f766e;
  --accent: #f59e0b;
  --good: #15803d;
  --bad: #b42318;
  --side: #0f172a;
  --side-soft: #172033;
  font-family: Vazirmatn, "Segoe UI", Tahoma, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

.sp-body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
}

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

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  padding: 11px 12px;
}

select {
  min-height: 44px;
  color: #101828;
  background-color: #fff;
  text-align: center;
  direction: ltr;
}

select option {
  color: #101828;
  background: #fff;
}

textarea {
  resize: vertical;
  line-height: 1.9;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  outline: 3px solid rgba(21, 94, 117, 0.14);
}

h1,
h2,
h3,
p,
pre {
  margin: 0;
}

h1 {
  font-size: 32px;
  line-height: 1.35;
}

h2 {
  font-size: 18px;
}

h3 {
  font-size: 14px;
}

label {
  display: grid;
  gap: 7px;
  font-size: 13px;
  color: #344054;
}

fieldset {
  border: 1px solid var(--line);
  border-radius: 14px;
  margin: 0;
  padding: 14px;
}

legend {
  padding: 0 8px;
  color: #344054;
}

.hidden {
  display: none !important;
}

.sp-login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 80% 18%, rgba(20, 184, 166, 0.16), transparent 30%),
    radial-gradient(circle at 18% 82%, rgba(245, 158, 11, 0.16), transparent 28%),
    var(--bg);
}

.sp-login-card {
  width: min(440px, 100%);
  padding: 26px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.14);
  display: grid;
  gap: 22px;
}

.sp-login-form {
  display: grid;
  gap: 14px;
}

.sp-app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
}

.sp-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 20px;
  background: var(--side);
  color: #fff;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 22px;
}

.sp-brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sp-brand-row small,
.sp-sidebar-card span {
  display: block;
  color: #a8b4c3;
  margin-top: 3px;
}

.sp-logo {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #2dd4bf, #fbbf24);
  color: #082f49;
  font-weight: 900;
}

.sp-nav {
  display: grid;
  align-content: start;
  gap: 8px;
}

.sp-nav a {
  color: #dce7f2;
  text-decoration: none;
  padding: 12px 13px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.sp-nav a:hover {
  background: rgba(255, 255, 255, 0.1);
}

.sp-sidebar-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 14px;
  background: var(--side-soft);
}

.sp-main {
  min-width: 0;
  padding: 24px;
}

.sp-hero {
  min-height: 156px;
  border-radius: 22px;
  padding: 24px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(21, 94, 117, 0.92)),
    linear-gradient(90deg, #0f172a, #155e75);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
}

.sp-hero p {
  color: #d9eef3;
  margin-top: 8px;
}

.sp-hero-actions,
.sp-card-head,
.sp-inline-head,
.sp-action-row,
.sp-test-strip,
.sp-head-actions,
.quickTimeRow,
.targetTools,
.testButtonRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.sp-head-actions,
.quickTimeRow,
.targetTools,
.testButtonRow {
  justify-content: flex-start;
  gap: 8px;
}

.testButtonRow {
  display: flex;
  flex-wrap: wrap;
}

.sp-kicker,
.sp-hint,
.meta,
.sp-inline-head span,
.sp-mode small,
.sp-test-strip p {
  color: var(--muted);
  font-size: 12px;
}

.sp-hero .sp-kicker {
  color: #9ee8df;
}

.sp-btn {
  border: 0;
  border-radius: 10px;
  min-height: 42px;
  padding: 10px 16px;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(21, 94, 117, 0.18);
}

.sp-btn:hover {
  filter: brightness(0.98);
}

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

.sp-btn-warning {
  background: var(--accent);
  color: #111827;
}

.sp-btn-soft {
  background: #e8f7f6;
  color: var(--brand-2);
  box-shadow: none;
}

.sp-btn-light {
  background: #fff;
  color: var(--brand);
  border: 1px solid var(--line);
  box-shadow: none;
}

.sp-small {
  min-height: 34px;
  padding: 7px 11px;
  font-size: 12px;
}

.sp-full {
  width: 100%;
  margin-top: 12px;
}

.sp-vpn-pill {
  min-width: 230px;
  padding: 11px 14px;
  border-radius: 999px;
  text-align: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
}

.sp-vpn-pill.ok {
  background: #ecfdf3;
  color: var(--good);
  border-color: #bbf7d0;
}

.sp-vpn-pill.bad {
  background: #fff1f2;
  color: var(--bad);
  border-color: #fecdd3;
}

.sp-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.metric {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.metric span {
  color: var(--muted);
  font-size: 12px;
}

.metric strong {
  display: block;
  margin-top: 7px;
  font-size: 27px;
}

.sp-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 18px;
  align-items: start;
}

.sp-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.07);
}

.sp-compose,
.sp-side-stack,
.sp-connection-grid,
.targets,
.vpnServers,
.destinationStats {
  display: grid;
  gap: 14px;
}

.sp-compose {
  grid-column: 1;
  grid-row: 1;
}

.sp-board > .sp-network {
  grid-column: 1;
  grid-row: 2;
}

.sp-connection-grid {
  grid-column: 1;
  grid-row: 3;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sp-side-stack {
  grid-column: 2;
  grid-row: 1 / span 3;
}

.sp-mode-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.sp-mode,
.target,
.vpnServer,
.destinationRow {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.sp-mode {
  min-height: 74px;
  padding: 12px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 9px;
}

.sp-mode input,
.target input {
  width: auto;
}

.sp-mode.active {
  border-color: var(--brand-2);
  background: #ecfdf5;
}

.sp-mode.locked.active {
  color: var(--text);
  border-color: #86efac;
  background: #f0fdf4;
}

.sp-mode.locked,
.target.locked {
  background: #f6f7f9;
  color: #7c8792;
}

.target {
  position: relative;
  grid-template-columns: auto 1fr auto;
  align-items: center;
}

.target small {
  grid-column: 2;
}

.targetRemove {
  grid-row: 1 / span 2;
  grid-column: 3;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fff1f2;
  color: #b42318;
  cursor: pointer;
}

.targetRemove:hover {
  border-color: #fda4af;
  background: #ffe4e6;
}

.sp-field-grid,
.sp-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.sp-two-col {
  grid-template-columns: 1fr;
  align-items: start;
}

.sp-two-col fieldset {
  padding: 10px 12px;
}

.sp-test-strip {
  border: 1px solid #fde68a;
  background: #fffbeb;
  border-radius: 16px;
  padding: 14px;
}

.connectionBadges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.connectionBadges span,
.testResult {
  border-radius: 999px;
  padding: 7px 10px;
  background: #fff7ed;
  color: #92400e;
  border: 1px solid #fed7aa;
  font-size: 12px;
  font-weight: 800;
}

.connectionBadges .ok,
.testResult.ok {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.connectionBadges .bad,
.testResult.bad {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

.testResult {
  width: 100%;
  border-radius: 12px;
}

.sp-date-grid {
  display: grid;
  grid-template-columns: 1.15fr repeat(4, 0.85fr);
  gap: 8px;
}

.sp-date-grid label {
  gap: 4px;
  font-size: 11px;
}

.sp-date-grid select {
  min-height: 36px;
  padding: 7px 8px;
}

.todayBadge {
  margin-bottom: 8px;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  background: #f0fdf4;
  color: #166534;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 700;
}

.quickTimeRow {
  margin-bottom: 8px;
  gap: 6px;
}

.quickTimeRow .compact,
.targetTools .compact {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 11px;
}

.sp-destinations {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.target {
  padding: 8px 9px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-height: 42px;
}

.target small {
  color: var(--muted);
  font-size: 10px;
}

.targetGroupHeading {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  margin: 4px 2px 0;
  grid-column: 1 / -1;
}

.targets {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.target span {
  overflow: hidden;
  white-space: normal;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.targetRemove {
  min-height: 26px;
  padding: 0 7px;
  font-size: 11px;
}

.sp-destinations .sp-inline-head {
  gap: 8px;
}

.sp-destinations .sp-inline-head h3 {
  white-space: nowrap;
}

.sp-destinations .sp-inline-head > span {
  display: none;
}

.sp-hint {
  margin-top: 7px;
}

.sp-message {
  color: var(--brand);
  min-height: 22px;
}

.sp-phone {
  margin-top: 14px;
  background: #dbe5ea;
  border-radius: 18px;
  padding: 18px 14px;
}

.sp-bubble {
  width: min(100%, 330px);
  margin-right: auto;
  background: #fff;
  border-radius: 16px;
  padding: 11px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.1);
}

.previewMedia {
  min-height: 180px;
  border-radius: 12px;
  background: #eef2f6;
  border: 1px dashed #b9c6d2;
  display: grid;
  place-items: center;
  color: var(--muted);
  overflow: hidden;
}

.previewMedia img {
  width: 100%;
  height: 100%;
  max-height: 260px;
  object-fit: cover;
}

.sp-bubble pre {
  white-space: pre-wrap;
  line-height: 1.9;
  margin-top: 10px;
  font-family: inherit;
  font-size: 14px;
}

.sp-network-summary {
  padding: 13px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid var(--line);
  display: grid;
  gap: 7px;
}

.sp-network {
  padding: 14px;
}

.sp-network .sp-card-head {
  gap: 10px;
}

.sp-network .sp-network-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  padding: 10px 12px;
}

.sp-network .vpnServers {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.sp-network .vpnServer {
  min-height: 58px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
}

.sp-network .vpnServer strong,
.sp-network .vpnServer .meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sp-network .vpnServer button {
  grid-row: 1 / span 2;
  grid-column: 2;
  white-space: nowrap;
}

.sp-whatsapp {
  display: grid;
  gap: 12px;
}

.whatsappQr {
  display: grid;
  gap: 8px;
  place-items: center;
  min-height: 120px;
  padding: 12px;
  border: 1px dashed #cbd6df;
  border-radius: 14px;
  background: #f8fafc;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

.whatsappQr img {
  width: min(240px, 100%);
  height: auto;
  border-radius: 10px;
  background: #fff;
  padding: 8px;
}

.connectedBox {
  color: #047857;
  font-weight: 800;
}

.vpnServer {
  padding: 13px;
  display: grid;
  gap: 8px;
}

.vpnServer.active {
  border-color: #86efac;
  background: #f0fdf4;
}

.vpnServer button {
  justify-self: start;
}

.sp-activity,
.sp-analytics,
.sp-history {
  margin-top: 18px;
}

.activityList {
  margin-top: 14px;
  display: grid;
  gap: 10px;
  max-height: 360px;
  overflow: auto;
}

.activityItem {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) 110px minmax(0, 1.4fr);
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
}

.activityItem span {
  color: var(--muted);
  font-size: 12px;
}

.activityItem code {
  direction: ltr;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #475467;
  font-family: Consolas, monospace;
  font-size: 12px;
}

.sp-chart-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 18px;
}

.chart {
  min-height: 220px;
  display: flex;
  align-items: end;
  gap: 8px;
  padding: 18px 4px 0;
  border-bottom: 1px solid #cbd6df;
}

.barWrap {
  flex: 1;
  min-width: 24px;
  display: grid;
  align-items: end;
  gap: 6px;
  text-align: center;
}

.bar {
  min-height: 5px;
  border-radius: 8px 8px 0 0;
  background: var(--brand);
}

.bar.views {
  background: var(--accent);
}

.barLabel {
  color: var(--muted);
  font-size: 11px;
}

.destinationRow {
  padding: 13px;
}

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

.publishQueueList {
  margin-top: 14px;
  display: grid;
  gap: 12px;
}

.queueItem {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 14px;
  display: grid;
  gap: 10px;
}

.queueItem > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.queueItem > div:first-child span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.historyCard {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.historyThumb {
  min-height: 150px;
  background: #eef2f6;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.historyThumb img {
  width: 100%;
  height: 170px;
  object-fit: cover;
}

.sp-templates {
  display: grid;
  gap: 12px;
}

.sp-gallery {
  display: grid;
  gap: 12px;
}

.galleryActionsTop {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.galleryList {
  display: grid;
  gap: 10px;
  max-height: 520px;
  overflow: auto;
}

.galleryCard {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
}

.galleryCard.selected {
  border-color: #14b8a6;
  background: #f0fdfa;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.14);
}

.galleryThumb {
  width: 92px;
  min-height: 92px;
  border: 1px dashed #cbd6df;
  border-radius: 12px;
  background: #eef2f6;
  color: var(--muted);
  display: grid;
  place-items: center;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
}

.galleryThumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.galleryMeta {
  min-width: 0;
  display: grid;
  gap: 5px;
  align-content: start;
}

.galleryMeta strong,
.galleryMeta span,
.galleryMeta small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.galleryMeta span,
.galleryMeta small {
  color: var(--muted);
  font-size: 12px;
}

.galleryCardActions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.templateList {
  display: grid;
  gap: 10px;
  max-height: 520px;
  overflow: auto;
}

.templateCard {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  min-height: 132px;
}

.templateCard.selected {
  border-color: #14b8a6;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.14);
}

.templateThumb {
  min-height: 100%;
  background: #eef2f6;
  display: grid;
  place-items: center;
  color: var(--muted);
  padding: 10px;
  text-align: center;
}

.templateThumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.templateThumb.noImage {
  background: #ecfeff;
  color: #155e75;
  font-weight: 800;
}

.templateBody {
  display: grid;
  gap: 7px;
  padding: 12px;
  min-width: 0;
}

.templateBody span {
  color: var(--muted);
  font-size: 12px;
}

.templateBody em {
  justify-self: start;
  border-radius: 999px;
  padding: 4px 8px;
  background: #ecfeff;
  color: #155e75;
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
}

.templateBody p {
  white-space: pre-wrap;
  color: #344054;
  line-height: 1.7;
  max-height: 72px;
  overflow: hidden;
  font-size: 13px;
}

.templateActions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.historyBody {
  padding: 13px;
  display: grid;
  gap: 9px;
}

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

.statusBadge {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 5px 9px;
  background: #eef2f6;
  color: #475467;
  font-size: 11px;
}

.statusBadge.scheduled,
.statusBadge.working {
  background: #fff7ed;
  color: #b45309;
}

.statusBadge.published {
  background: #ecfdf3;
  color: #047857;
}

.statusBadge.failed {
  background: #fef3f2;
  color: #b42318;
}

.statusBadge.cancelled {
  background: #f2f4f7;
  color: #667085;
}

.queueChips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.queueChips span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 8px;
  background: #f8fafc;
  color: #475467;
  font-size: 11px;
}

.historyText {
  white-space: pre-wrap;
  color: #344054;
  line-height: 1.8;
  max-height: 104px;
  overflow: hidden;
}

.targetLogTitle {
  color: #0f172a;
  font-size: 12px;
  font-weight: 900;
  margin-top: 2px;
}

.targetLog {
  display: grid;
  gap: 7px;
}

.targetLogRow {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
  padding: 8px 10px;
  color: #334155;
  font-size: 12px;
}

.targetLogRow.published {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.targetLogRow.failed {
  border-color: #fecaca;
  background: #fff1f2;
}

.targetLogRow.pending,
.targetLogRow.working {
  border-color: #fed7aa;
  background: #fff7ed;
}

.targetLogStatus {
  border-radius: 999px;
  padding: 3px 8px;
  background: #e2e8f0;
  font-weight: 900;
  white-space: nowrap;
}

.targetLogRow.published .targetLogStatus {
  background: #dcfce7;
  color: #047857;
}

.targetLogRow.failed .targetLogStatus {
  background: #fee2e2;
  color: #b42318;
}

.targetLogRow time {
  direction: ltr;
  color: var(--muted);
  white-space: nowrap;
}

.targetError {
  grid-column: 1 / -1;
  color: #b42318;
  line-height: 1.7;
  word-break: break-word;
}

.targetLogEmpty {
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 10px;
  color: var(--muted);
  font-size: 12px;
}

.historyHelp {
  border-right: 3px solid #bae6fd;
  padding: 8px 10px;
  background: #f0f9ff;
  color: #475467;
  font-size: 12px;
  line-height: 1.7;
}

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

.dangerSoft {
  min-height: 38px;
  border: 1px solid #fecaca;
  border-radius: 9px;
  background: #fff1f2;
  color: #b42318;
  cursor: pointer;
}

.campaignReport {
  display: grid;
  gap: 14px;
  border-right: 4px solid #0f766e;
}

.campaignReport.hidden {
  display: none;
}

.campaignReportSummary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.campaignReportSummary strong {
  margin-left: auto;
  font-size: 16px;
}

.campaignReportSummary span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
}

.campaignReportList {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 10px;
}

.campaignRun {
  display: grid;
  gap: 8px;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.campaignRun > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.campaignRun time {
  color: var(--muted);
  font-size: 12px;
}

.campaignRun.failed { border-color: #fecaca; background: #fff7f7; }
.campaignRun.published { border-color: #bbf7d0; background: #f7fff9; }
.campaignRun.scheduled,
.campaignRun.working { border-color: #fed7aa; background: #fffaf2; }

/* The daily workflow is intentionally focused on composing and scheduling. */
.sp-metrics,
.sp-mode-grid,
#activity,
#analytics,
.sp-action-row button[type="submit"],
#testReportButton {
  display: none !important;
}

.weeklyPlanner {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 10px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid #a7f3d0;
  border-radius: 8px;
  background: #f0fdf4;
}

.sp-main-publish {
  width: 100%;
  min-height: 52px;
  font-size: 1rem;
  font-weight: 800;
}

.weeklyPlanner fieldset {
  margin: 0;
  padding: 8px 10px;
  background: #fff;
}

.campaignTimes,
.campaignStories {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.campaignTimes label,
.campaignStories label {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.campaignStories span {
  color: var(--muted);
  font-size: 11px;
}

#dailyCampaignButton {
  min-width: 210px;
  font-weight: 900;
}

.sp-history {
  content-visibility: auto;
  contain-intrinsic-size: 900px;
}

.historyMore {
  width: min(100%, 360px);
  margin: 16px auto 0;
}

@media (max-width: 1180px) {
  .sp-app {
    grid-template-columns: 1fr;
  }

  .sp-sidebar {
    position: relative;
    height: auto;
    grid-template-columns: 1fr;
  }

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

  .sp-board,
  .sp-connection-grid,
  .sp-chart-grid,
  .activityItem,
  .historyList,
  .sp-metrics,
  .sp-mode-grid,
  .sp-field-grid,
  .sp-two-col,
  .sp-date-grid {
    grid-template-columns: 1fr;
  }

  .sp-compose,
  .sp-board > .sp-network,
  .sp-connection-grid,
  .sp-side-stack {
    grid-column: auto;
    grid-row: auto;
  }

  .sp-network .vpnServers,
  .sp-network .sp-network-summary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .sp-main {
    padding: 14px;
  }

  .sp-hero {
    border-radius: 16px;
  }

  .sp-nav {
    grid-template-columns: 1fr 1fr;
  }

  .sp-action-row,
  .sp-test-strip {
    display: grid;
  }

  .sp-network .vpnServer {
    grid-template-columns: 1fr;
  }

  .sp-network .vpnServer button {
    grid-column: auto;
    grid-row: auto;
    justify-self: stretch;
  }

  .weeklyPlanner {
    grid-template-columns: 1fr;
  }
}
