
.sa-page {
  display: grid;
  gap: 18px;
}

.sa-page.hidden {
  display: none !important;
}

.sa-intro,
.sa-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}

.sa-intro {
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.sa-intro h2,
.sa-panel h3 {
  margin: 4px 0 6px;
  color: #0f2f69;
}

.sa-intro p {
  max-width: 760px;
  margin: 0;
  color: #64748b;
  line-height: 1.55;
}

.sa-intro-actions,
.sa-inline-actions,
.sa-form-actions,
.sa-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.sa-scope-badge,
.sa-resolved {
  padding: 9px 12px;
  border-radius: 999px;
  background: #eaf3ff;
  color: #075bd8;
  font-size: 12px;
  font-weight: 800;
}

.sa-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 18px;
  align-items: start;
}

.sa-panel {
  padding: 20px;
}

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

.sa-form,
.sa-form label {
  display: grid;
  gap: 7px;
}

.sa-form {
  gap: 15px;
}

.sa-form label,
.sa-panel label {
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}

.sa-form input,
.sa-form textarea,
.sa-form select,
.sa-panel select,
.sa-toolbar input,
.sa-toolbar select {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #d8e1ee;
  border-radius: 12px;
  background: #ffffff;
  color: #0f172a;
  padding: 10px 11px;
  font: inherit;
  outline: none;
}

.sa-form input:focus,
.sa-form textarea:focus,
.sa-form select:focus,
.sa-panel select:focus,
.sa-toolbar input:focus,
.sa-toolbar select:focus {
  border-color: #3687ef;
  box-shadow: 0 0 0 3px rgba(7, 91, 216, 0.11);
}

.sa-form select:disabled,
.sa-form input:disabled {
  color: #64748b;
  background: #f1f5f9;
}

.sa-grid {
  display: grid;
  gap: 12px;
}

.sa-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sa-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sa-upload-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 14px;
  align-items: stretch;
}

.sa-upload-grid small,
#sa-upload-status {
  color: #64748b;
  font-size: 11px;
}

.sa-image-preview {
  min-height: 145px;
  border-radius: 16px;
  border: 1px dashed #b9c8dc;
  background:
    linear-gradient(135deg, rgba(7, 91, 216, 0.06), rgba(56, 189, 248, 0.08));
  overflow: hidden;
  display: grid;
  place-items: center;
  color: #64748b;
  font-size: 12px;
  text-align: center;
}

.sa-image-preview img {
  width: 100%;
  height: 100%;
  min-height: 145px;
  object-fit: cover;
  display: block;
}

.sa-check {
  grid-template-columns: auto 1fr !important;
  align-items: center;
  width: fit-content;
}

.sa-check input {
  width: 17px;
  height: 17px;
}

.sa-button,
.sa-link-button {
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.sa-button {
  padding: 10px 14px;
  border-radius: 12px;
}

.sa-button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.sa-primary {
  color: #ffffff;
  background: linear-gradient(135deg, #075bd8, #0b7be8);
}

.sa-secondary {
  color: #075bd8;
  background: #eaf3ff;
}

.sa-danger {
  color: #b91c1c;
  background: #fee2e2;
}

.sa-link-button {
  background: transparent;
  color: #075bd8;
  padding: 5px;
}

.sa-resolved {
  margin: 14px 0;
  border-radius: 14px;
}

.sa-effective-list,
.sa-card-list {
  display: grid;
  gap: 12px;
}

.sa-effective-card {
  position: relative;
  overflow: hidden;
  min-height: 145px;
  border-radius: 18px;
  background: linear-gradient(135deg, #075bd8, #062e72);
  color: #ffffff;
}

.sa-effective-card img {
  width: 100%;
  height: 165px;
  object-fit: cover;
  display: block;
}

.sa-effective-overlay {
  position: absolute;
  inset: auto 0 0;
  padding: 32px 15px 14px;
  background: linear-gradient(transparent, rgba(2, 20, 52, 0.92));
}

.sa-effective-card.no-image .sa-effective-overlay {
  position: static;
  background: transparent;
  padding: 24px 18px;
}

.sa-effective-overlay b {
  display: block;
  font-size: 15px;
}

.sa-effective-overlay small {
  display: block;
  margin-top: 5px;
  color: #dceeff;
  line-height: 1.4;
}

.sa-list-panel {
  overflow: hidden;
}

.sa-list-head {
  align-items: center;
}

.sa-toolbar input {
  min-width: 220px;
}

.sa-list-summary {
  margin-bottom: 12px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.sa-ad-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 12px;
  background: #fbfdff;
}

.sa-ad-thumb {
  height: 100px;
  overflow: hidden;
  border-radius: 13px;
  background: linear-gradient(135deg, #075bd8, #0ea5e9);
  display: grid;
  place-items: center;
  color: #ffffff;
  font-weight: 900;
}

.sa-ad-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sa-ad-main h4 {
  margin: 0 0 5px;
  color: #0f2f69;
}

.sa-ad-main p {
  margin: 0 0 9px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}

.sa-meta {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.sa-pill {
  padding: 5px 8px;
  border-radius: 999px;
  background: #edf2f7;
  color: #475569;
  font-size: 10px;
  font-weight: 800;
}

.sa-pill.active {
  background: #dcfce7;
  color: #15803d;
}

.sa-pill.inactive {
  background: #fee2e2;
  color: #b91c1c;
}

.sa-ad-actions {
  display: grid;
  gap: 7px;
  min-width: 110px;
}

.sa-empty,
.sa-loading {
  padding: 28px;
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  color: #64748b;
  text-align: center;
}

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

@media (max-width: 820px) {
  .sa-intro,
  .sa-panel-head,
  .sa-list-head {
    align-items: stretch;
    flex-direction: column;
  }

  .sa-grid-2,
  .sa-grid-3,
  .sa-upload-grid {
    grid-template-columns: 1fr;
  }

  .sa-ad-card {
    grid-template-columns: 1fr;
  }

  .sa-ad-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .sa-toolbar input {
    min-width: 0;
  }
}
