.campaign-page {
  color: #253247;
}

.campaign-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  margin-bottom: 18px;
  background: #fff;
  border: 1px solid #e8edf4;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(37, 50, 71, 0.06);
}

.campaign-hero span {
  display: block;
  margin-bottom: 4px;
  color: #6b7788;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
}

.campaign-hero h4 {
  margin: 0;
  color: #253247;
  font-weight: 800;
}

.campaign-filter-tabs {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

.campaign-filter {
  min-height: 38px;
  padding: 0 14px;
  color: #536174;
  background: #f5f7fb;
  border: 1px solid #dfe7f1;
  border-radius: 6px;
  font-weight: 700;
}

.campaign-filter.active {
  color: #fff;
  background: #2266e3;
  border-color: #2266e3;
}

.campaign-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.campaign-summary-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 92px;
  padding: 18px;
  background: #fff;
  border: 1px solid #e8edf4;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(37, 50, 71, 0.05);
}

.campaign-summary-card i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: #2266e3;
  background: #eaf1ff;
  border-radius: 8px;
  font-size: 24px;
}

.campaign-summary-card strong {
  display: block;
  color: #253247;
  font-size: 26px;
  line-height: 1.1;
}

.campaign-summary-card span {
  display: block;
  margin-top: 4px;
  color: #7a8798;
  font-size: 13px;
}

.loyalty-settings-panel {
  padding: 18px;
  margin-bottom: 18px;
  background: #fff;
  border: 1px solid #e8edf4;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(37, 50, 71, 0.05);
}

.loyalty-settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.loyalty-settings-head span {
  display: block;
  color: #6b7788;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.loyalty-settings-head h5 {
  margin: 2px 0 0;
  color: #253247;
  font-weight: 800;
}

.loyalty-master-card,
.loyalty-disabled-state,
.loyalty-option-card,
.loyalty-config-card {
  background: #fff;
  border: 1px solid #e8edf4;
  border-radius: 8px;
}

.loyalty-master-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  margin-bottom: 14px;
  background: #f8fafc;
}

.loyalty-master-card strong,
.loyalty-option-card strong,
.loyalty-config-head strong {
  display: block;
  color: #253247;
  font-weight: 800;
}

.loyalty-master-card span,
.loyalty-option-card span,
.loyalty-config-head span {
  display: block;
  margin-top: 3px;
  color: #6b7788;
  font-size: 13px;
  line-height: 1.35;
}

.loyalty-disabled-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 170px;
  padding: 24px;
  color: #6b7788;
  background: #f8fafc;
  text-align: center;
}

.loyalty-disabled-state i {
  margin-bottom: 10px;
  color: #94a3b8;
  font-size: 36px;
}

.loyalty-disabled-state strong {
  color: #253247;
  font-size: 16px;
}

.loyalty-settings-body {
  display: none;
}

.loyalty-settings-panel.is-active .loyalty-settings-body {
  display: block;
}

.loyalty-settings-panel.is-active .loyalty-disabled-state {
  display: none;
}

.loyalty-switch {
  position: relative;
  flex: 0 0 auto;
  width: 50px;
  height: 28px;
  margin: 0;
}

.loyalty-switch input {
  position: absolute;
  opacity: 0;
}

.loyalty-switch span {
  position: absolute;
  inset: 0;
  display: block;
  margin: 0;
  background: #cbd5e1;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.18s ease;
}

.loyalty-switch span::after {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.22);
  content: "";
  transition: transform 0.18s ease;
}

.loyalty-switch input:checked + span {
  background: #2266e3;
}

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

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

.loyalty-option-card {
  padding: 14px;
  background: #f8fafc;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.loyalty-option-card.is-enabled {
  border-color: #bdd2ff;
  box-shadow: 0 8px 20px rgba(34, 102, 227, 0.08);
}

.loyalty-option-top,
.loyalty-config-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.loyalty-config-card {
  display: none;
  padding: 16px;
  margin-top: 14px;
}

.loyalty-config-card.is-visible {
  display: block;
}

.loyalty-config-head {
  margin-bottom: 14px;
}

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

.loyalty-settings-grid label {
  margin: 0;
  color: #5f6c7c;
  font-weight: 700;
}

.loyalty-settings-grid label > span {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 6px;
  font-size: 12px;
}

.loyalty-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 19px;
  height: 19px;
  padding: 0;
  color: #2266e3;
  background: #eaf1ff;
  border: 1px solid #c7d8ff;
  border-radius: 50%;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.loyalty-info:hover {
  color: #fff;
  background: #2266e3;
  border-color: #2266e3;
}

.loyalty-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 11px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.loyalty-bubble {
  position: relative;
  display: none;
  align-items: flex-start;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 12px;
  color: #475569;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  line-height: 1.45;
}

.loyalty-option-card.is-enabled .loyalty-bubble,
.loyalty-bubble.is-static {
  display: flex;
}

.loyalty-bubble::before {
  position: absolute;
  top: -7px;
  left: 18px;
  width: 12px;
  height: 12px;
  background: #fff7ed;
  border-top: 1px solid #fed7aa;
  border-left: 1px solid #fed7aa;
  transform: rotate(45deg);
  content: "";
}

.loyalty-bubble i {
  flex: 0 0 auto;
  color: #d97706;
  font-size: 20px;
}

.loyalty-bubble .loyalty-info {
  flex: 0 0 auto;
  background: #ffedd5;
  border-color: #fdba74;
}

.loyalty-bubble span {
  margin: 0;
  color: #475569;
  font-size: 13px;
}

.loyalty-custom-input {
  display: none;
  margin-top: 8px;
}

.loyalty-preset-field.is-custom .loyalty-custom-input {
  display: block;
}

.loyalty-example-strip {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  padding: 12px 14px;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #dbe5f0;
  border-radius: 8px;
  line-height: 1.45;
}

.loyalty-example-strip i {
  flex: 0 0 auto;
  color: #d97706;
  font-size: 20px;
}

.loyalty-example-strip strong {
  color: #253247;
}

.campaign-loading,
.campaign-empty {
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #7a8798;
  background: #fff;
  border: 1px solid #e8edf4;
  border-radius: 8px;
}

.campaign-empty {
  flex-direction: column;
}

.campaign-empty i {
  color: #b9c3d0;
  font-size: 48px;
}

.campaign-empty strong {
  color: #253247;
  font-size: 17px;
}

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

.campaign-card {
  display: flex;
  flex-direction: column;
  min-height: 310px;
  padding: 18px;
  background: #fff;
  border: 1px solid #e8edf4;
  border-top: 4px solid #94a3b8;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(37, 50, 71, 0.05);
}

.campaign-card.is-active {
  border-top-color: #0f9f6e;
}

.campaign-card.is-upcoming {
  border-top-color: #2266e3;
}

.campaign-card.is-expired {
  border-top-color: #d33f49;
}

.campaign-card.is-paused {
  border-top-color: #b7791f;
}

.campaign-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.campaign-status {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 4px 10px;
  color: #2266e3;
  background: #eaf1ff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.campaign-card-top strong {
  color: #0f9f6e;
  font-size: 22px;
}

.campaign-card h5 {
  margin: 0 0 8px;
  color: #253247;
  font-weight: 800;
}

.campaign-card p {
  min-height: 44px;
  margin-bottom: 14px;
  color: #64748b;
  line-height: 1.45;
}

.campaign-dates {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
}

.campaign-dates span {
  color: #536174;
  font-size: 13px;
}

.campaign-dates i {
  margin-right: 6px;
  color: #2266e3;
}

.campaign-services {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.campaign-services span {
  display: inline-flex;
  padding: 4px 8px;
  color: #334155;
  background: #f1f5f9;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.campaign-conditions {
  padding: 10px 12px;
  margin-top: auto;
  color: #7c2d12;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  font-size: 12px;
}

.campaign-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.campaign-card-actions .btn {
  border-radius: 6px;
}

.campaign-modal .modal-header,
.campaign-modal .modal-footer {
  border-color: #e8edf4;
}

.campaign-form-section {
  padding-bottom: 12px;
  margin-bottom: 18px;
  border-bottom: 1px solid #eef2f7;
}

.campaign-form-section h6 {
  margin-bottom: 14px;
  color: #253247;
  font-weight: 800;
}

.campaign-modal label {
  color: #5f6c7c;
  font-weight: 700;
}

.campaign-modal .form-control {
  border-color: #dfe7f1;
  border-radius: 6px;
}

.campaign-service-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.campaign-service-chip {
  margin: 0;
  cursor: pointer;
}

.campaign-service-chip input {
  display: none;
}

.campaign-service-chip span {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 6px 11px;
  color: #334155;
  background: #f6f8fb;
  border: 1px solid #dfe7f1;
  border-radius: 999px;
  font-weight: 700;
}

.campaign-service-chip input:checked + span {
  color: #fff;
  background: #2266e3;
  border-color: #2266e3;
}

.campaign-service-empty {
  width: 100%;
  padding: 14px;
  color: #7a8798;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  text-align: center;
}

@media (max-width: 1199px) {
  .campaign-summary-grid,
  .campaign-grid,
  .loyalty-option-grid,
  .loyalty-settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .campaign-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .campaign-filter-tabs,
  .campaign-filter {
    width: 100%;
  }

  .campaign-summary-grid,
  .campaign-grid,
  .loyalty-option-grid,
  .loyalty-settings-grid {
    grid-template-columns: 1fr;
  }

  .campaign-card-actions {
    flex-wrap: wrap;
  }
}
