.success {
  background: #ecfdf3;
  border: 1px solid #a6f4c5;
  border-radius: 6px;
  color: #027a48;
  padding: 10px;
}

.page-heading {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 20px;
}

.page-heading h1 {
  margin-bottom: 5px;
}

.inline-create {
  align-items: end;
  background: #fff;
  border: 1px solid #e4e8ee;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(220px, 0.8fr) minmax(280px, 1.2fr) auto;
  padding: 16px;
}

.list-builder {
  margin-top: 18px;
}

.list-filter {
  grid-template-columns: 240px minmax(200px, 1fr) 190px auto;
  margin: 0;
}

.button-link {
  background: transparent;
  color: #b42318;
  font-weight: 700;
  padding: 0;
}

.button-link:hover {
  text-decoration: underline;
}

.span-all {
  grid-column: 1 / -1;
}

.page-heading-actions,
.section-heading,
.table-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.campaign-heading p,
.section-heading p {
  color: #667085;
  margin: 0;
}

.campaign-title {
  margin-bottom: 18px;
}

.campaign-title h1 {
  margin-bottom: 6px;
}

.campaign-title p,
.campaign-list-name {
  color: #475467;
  font-size: 15px;
  margin: 0;
}

.campaign-title strong,
.campaign-list-name strong {
  color: #173a5e;
}

.campaign-current {
  align-items: center;
  background: #fff;
  border: 1px solid #dbe4ee;
  border-left: 4px solid #f26b38;
  border-radius: 6px;
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  padding: 14px 16px;
}

.campaign-current > div {
  display: grid;
  gap: 2px;
  margin-right: auto;
}

.campaign-current span {
  color: #075b9d;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.campaign-current strong {
  color: #173a5e;
}

.campaign-current small {
  color: #667085;
}

.campaign-tabbar {
  border-bottom: 1px solid #cbd5e1;
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  overflow-x: auto;
  padding-bottom: 10px;
}

.campaign-tabbar button {
  flex: 0 0 auto;
}

.campaign-tabbar button.active {
  border-bottom: 3px solid #f26b38;
}

.campaign-tab-panel[hidden] {
  display: none;
}

.section-heading {
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-heading h2 {
  margin-bottom: 3px;
}

.table-actions {
  flex-wrap: nowrap;
}

.table-actions a {
  color: #075b9d;
  font-weight: 700;
}

.compact-button {
  font-size: 13px;
  padding: 7px 10px;
  white-space: nowrap;
}

.empty-state {
  background: #fff;
  border: 1px solid #e4e8ee;
  border-radius: 6px;
  color: #667085;
  padding: 18px;
}

.campaign-actions,
.report-toolbar,
.report-heading {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.report-heading {
  justify-content: space-between;
}

.report-heading h1 {
  margin-bottom: 4px;
}

.campaign-actions form,
.report-toolbar form {
  margin: 0;
}

.batch-send-form {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.batch-send-form label {
  min-width: 130px;
}

.batch-send-form select {
  margin-top: 4px;
}

.campaign-actions button:disabled {
  background: #98a2b3;
  cursor: not-allowed;
}

.campaign-progress-panel {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.campaign-progress-head {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.campaign-progress-head div {
  display: grid;
  gap: 3px;
}

.campaign-progress-head strong {
  color: #173a5e;
  font-size: 18px;
}

.campaign-progress-head span {
  color: #667085;
  font-size: 14px;
}

.campaign-progress-head output {
  color: #075b9d;
  font-size: 22px;
  font-weight: 800;
}

.campaign-progress-track {
  background: #e4e8ee;
  border-radius: 999px;
  height: 14px;
  overflow: hidden;
}

.campaign-progress-track span {
  background: linear-gradient(90deg, #075b9d, #1e74b7);
  display: block;
  height: 100%;
  transition: width 0.25s ease;
}

.campaign-progress-stats {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.campaign-progress-stats span {
  background: #f8fafc;
  border: 1px solid #e4e8ee;
  border-radius: 6px;
  color: #475467;
  padding: 10px;
}

.campaign-progress-stats strong {
  color: #173a5e;
  display: block;
  font-size: 20px;
}

button.danger {
  background: #b42318;
}

button.danger:hover {
  background: #912018;
}

.cards-compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 620px;
}

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

.report-cards .card strong {
  font-size: 24px;
}

.report-list-table {
  overflow-x: auto;
}

.report-list-table table {
  min-width: 1080px;
}

@media (max-width: 760px) {
  .campaign-progress-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

.report-grid > * {
  min-width: 0;
}

.report-section {
  margin-top: 24px;
  min-width: 0;
}

.report-note {
  font-size: 13px;
  margin-top: 18px;
}

.activity-filters {
  align-items: end;
  background: #fff;
  border: 1px solid #dbe4ee;
  border-radius: 6px;
  display: grid;
  gap: 10px;
  grid-template-columns: 150px 170px minmax(190px, 1fr) 170px minmax(170px, 1fr);
  margin-bottom: 12px;
  padding: 14px;
}

.recipient-filters {
  grid-template-columns: 170px 190px minmax(240px, 1fr);
}

.campaign-recipients .contacts-table {
  overflow-x: auto;
}

.campaign-recipients table {
  min-width: 920px;
}

.recipient-status {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  padding: 6px 9px;
  white-space: nowrap;
}

.status-sent {
  background: #dcfae6;
  color: #067647;
}

.status-queued {
  background: #e8f2f9;
  color: #075b9d;
}

.status-failed,
.status-bounced,
.status-spam {
  background: #fee4e2;
  color: #b42318;
}

.status-unsubscribed {
  background: #f2f4f7;
  color: #475467;
}

.status-held {
  background: #fff6d6;
  color: #854a0e;
}

.activity-filters label {
  color: #344054;
  font-size: 13px;
  font-weight: 700;
}

.activity-filters input,
.activity-filters select {
  margin-top: 5px;
}

.activity-filter-actions {
  display: flex;
  gap: 8px;
  grid-column: 1 / -1;
}

.message-preview {
  margin-top: 18px;
  max-width: 760px;
}

.single-send-panel {
  margin-bottom: 18px;
}

.single-send-panel h2 {
  margin-bottom: 12px;
}

.email-live-preview {
  background: #f8fafc;
  border: 1px solid #dbe4ee;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 14px;
}

.email-live-preview div {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.email-live-preview strong {
  color: #17365d;
}

.email-live-preview span {
  color: #667085;
  font-size: 13px;
}

.email-live-preview iframe,
.message-preview iframe {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  display: block;
  min-height: 620px;
  width: 100%;
}

.message-preview iframe {
  margin-top: 12px;
}

.public-message {
  margin-top: 12vh;
  text-align: center;
}

.public-message form {
  margin-top: 20px;
}

@media (max-width: 1100px) {
  .report-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .cards-compact,
  .report-cards,
  .report-grid {
    grid-template-columns: 1fr;
  }

  .inline-create,
  .list-filter {
    grid-template-columns: 1fr;
  }

  .page-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .page-heading-actions .button,
  .campaign-current .button {
    text-align: center;
    width: 100%;
  }

  .page-heading-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .campaign-current {
    align-items: stretch;
    flex-direction: column;
  }

  .campaign-tabbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }

  .campaign-tabbar button {
    width: 100%;
  }

  .campaign-tabbar button:last-child {
    grid-column: 1 / -1;
  }

  .activity-filters {
    grid-template-columns: 1fr;
  }

  .activity-filter-actions {
    grid-column: auto;
    flex-direction: column;
  }

  .activity-filter-actions .button,
  .activity-filter-actions button {
    text-align: center;
    width: 100%;
  }

  .report-section .contacts-table,
  .report-grid .contacts-table {
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
    overflow-x: auto;
  }

  .report-section .contacts-table table,
  .report-grid .contacts-table table {
    min-width: 620px;
  }
}
