.sw-dw-head {
  margin-bottom: 20px;
}
.sw-dw-head__title {
  font-size: 28px;
  font-weight: 700;
  color: var(--sw-text);
  margin: 0;
  line-height: 1.2;
}
.sw-dw-head__sub {
  font-size: 14px;
  margin: 6px 0 0;
}

.sw-dw-crumb {
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
}

.sw-dw-refresh {
  --bs-btn-bg: var(--sw-violet);
  --bs-btn-border-color: var(--sw-violet);
  --bs-btn-color: #fff;
  --bs-btn-hover-bg: var(--sw-violet-600);
  --bs-btn-hover-border-color: var(--sw-violet-600);
  --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: var(--sw-violet-600);
  --bs-btn-active-border-color: var(--sw-violet-600);
  --bs-btn-active-color: #fff;
  --bs-btn-focus-shadow-rgb: 110, 93, 248;
  --bs-btn-border-radius: 10px;
  --bs-btn-font-size: 14px;
  --bs-btn-font-weight: 600;
  height: 40px;
  gap: 8px;
  padding: 0 18px;
  white-space: nowrap;
}
.sw-dw-refresh svg {
  width: 16px;
  height: 16px;
}
.sw-dw-refresh.is-spinning svg {
  animation: sw-dw-spin 0.7s linear infinite;
}
@keyframes sw-dw-spin {
  to {
    transform: rotate(360deg);
  }
}

.sw-dw-stream__ic {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: #f1eefe;
  color: var(--sw-violet);
}
.sw-dw-stream__ic svg {
  width: 19px;
  height: 19px;
}
.sw-dw-stream__title {
  font-size: 15px;
}
.sw-dw-stream__meta {
  font-size: 13px;
  margin: 3px 0 0;
}

.sw-dw-stream__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
}
.sw-dw-stat__label {
  font-size: 12px;
  margin: 0 0 3px;
}
.sw-dw-stat__val {
  font-size: 15px;
}
.sw-dw-stat__val--err {
  color: #dc2626;
}
.sw-dw-stream__log {
  font-size: 14px;
  color: var(--sw-violet);
}
.sw-dw-stream__log:hover {
  color: var(--sw-violet-600);
}

.sw-dw-stream__retry {
  --bs-btn-bg: #fee2e2;
  --bs-btn-border-color: #fecaca;
  --bs-btn-color: #dc2626;
  --bs-btn-hover-bg: #fdd3d3;
  --bs-btn-hover-border-color: #fecaca;
  --bs-btn-hover-color: #dc2626;
  --bs-btn-active-bg: #fdd3d3;
  --bs-btn-active-border-color: #fecaca;
  --bs-btn-active-color: #dc2626;
  --bs-btn-focus-shadow-rgb: 220, 38, 38;
  --bs-btn-border-radius: 9px;
  --bs-btn-font-size: 14px;
  --bs-btn-font-weight: 600;
  height: 38px;
  gap: 8px;
}
.sw-dw-stream__retry svg {
  width: 15px;
  height: 15px;
}

.sw-pill--queue {
  background: #fef3c7;
  color: #b45309;
  min-width: 24px;
}

.sw-dw-queue__list {
  --bs-list-group-item-padding-x: 0;
  --bs-list-group-item-padding-y: 13px;
  --bs-list-group-border-color: var(--sw-border);
  --bs-list-group-bg: transparent;
}
.sw-dw-qrow {
  gap: 12px;
}
.sw-dw-qrow__ic {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--sw-bg-app);
  border: 1px solid var(--sw-border);
  color: var(--sw-text-muted);
}
.sw-dw-qrow__ic svg {
  width: 18px;
  height: 18px;
}
.sw-dw-qrow__ic--avatar {
  background: #f1eefe;
  color: var(--sw-violet);
  border-color: transparent;
}
.sw-dw-qrow__tc {
  flex: 1;
  min-width: 0;
}
.sw-dw-qrow__name {
  font-size: 14px;
}
.sw-dw-qrow__amt {
  color: #16a34a;
  font-weight: 600;
}
.sw-dw-qrow__meta {
  font-size: 13px;
  margin: 2px 0 0;
}

.sw-qact {
  --bs-btn-border-radius: 8px;
  --bs-btn-border-color: transparent;
  --bs-btn-hover-border-color: transparent;
  --bs-btn-active-border-color: transparent;
  width: 32px;
  height: 32px;
}
.sw-qact svg {
  width: 17px;
  height: 17px;
}
.sw-qact--ok {
  --bs-btn-bg: #dcfce7;
  --bs-btn-color: #16a34a;
  --bs-btn-hover-bg: #c7f3d6;
  --bs-btn-hover-color: #16a34a;
  --bs-btn-active-bg: #c7f3d6;
  --bs-btn-active-color: #16a34a;
  --bs-btn-focus-shadow-rgb: 22, 163, 74;
}
.sw-qact--no {
  --bs-btn-bg: #fee2e2;
  --bs-btn-color: #dc2626;
  --bs-btn-hover-bg: #fdd3d3;
  --bs-btn-hover-color: #dc2626;
  --bs-btn-active-bg: #fdd3d3;
  --bs-btn-active-color: #dc2626;
  --bs-btn-focus-shadow-rgb: 220, 38, 38;
}

/* =========================
  Datasets in the warehouse
========================= */
.sw-dw-dsec {
  margin-top: 8px;
}

.sw-dw-dsec__sub {
  font-size: 14px;
  margin: 6px 0 0;
}
.sw-dw-glabel {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.6px;
  margin: 24px 0 12px;
}
.sw-dw-card__top {
  margin-bottom: 14px;
}
.sw-dw-card__ic {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #f1eefe;
  color: var(--sw-violet);
}
.sw-dw-card__ic svg {
  width: 18px;
  height: 18px;
}

.sw-dpill {
  --bs-badge-padding-x: 10px;
  --bs-badge-padding-y: 3px;
  --bs-badge-font-size: 12px;
  --bs-badge-font-weight: 600;

  line-height: var(--bs-body-line-height);
  background: #f1eefe;
  color: var(--sw-violet);
  white-space: nowrap;
}
.sw-dw-card__title {
  font-size: 15px;
}
.sw-dw-card__valrow {
  gap: 7px;
  margin: 8px 0 6px;
}
.sw-dw-card__value {
  font-size: 23px;
  line-height: 1.1;
}
.sw-dw-card__unit {
  font-size: 13px;
}
.sw-dw-card__sub {
  font-size: 13px;
}

.sw-dwc {
  --bs-modal-width: 420px;
  --bs-modal-border-radius: 18px;
  --bs-modal-border-width: 0;
  --bs-modal-box-shadow: 0 24px 60px rgba(15, 16, 32, 0.22);
}

.sw-dwc.fade .modal-dialog {
  transition: transform 0.2s ease;
  transform: translateY(8px);
}
.sw-dwc.show .modal-dialog {
  transform: none;
}
.sw-dwc__panel {
  padding: 26px 26px 22px;
}

.sw-dwc__grip {
  display: none;
}
/* .d-inline-flex/.align-items-center/.justify-content-center/.rounded-circle
   moved to markup; only the off-scale box + danger tint + margin stay. */
.sw-dwc__icon {
  width: 48px;
  height: 48px;
  background: #fee2e2;
  color: #dc2626;
  margin-bottom: 16px;
}
.sw-dwc__icon svg {
  width: 24px;
  height: 24px;
}
.sw-dwc__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--sw-text);
  margin: 0 0 6px;
}
.sw-dwc__text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--sw-text-muted);
  margin: 0 0 22px;
}
/* display/align/justify already on the element in markup (.d-flex
   .align-items-center .justify-content-end) — only the off-scale gap stays. */
.sw-dwc__foot {
  gap: 10px;
}
.sw-dwc__btn {
  --bs-btn-border-radius: 11px;
  --bs-btn-font-size: 14px;
  --bs-btn-font-weight: 600;
  height: 42px;
  gap: 7px;
  padding: 0 18px;
}
.sw-dwc__btn svg {
  width: 15px;
  height: 15px;
}

.sw-dwc__btn--danger {
  --bs-btn-bg: #dc2626;
  --bs-btn-border-color: #dc2626;
  --bs-btn-color: #fff;
  --bs-btn-hover-bg: #c11f1f;
  --bs-btn-hover-border-color: #c11f1f;
  --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: #c11f1f;
  --bs-btn-active-border-color: #c11f1f;
  --bs-btn-active-color: #fff;
  --bs-btn-focus-shadow-rgb: 220, 38, 38;
}

@media (max-width: 575px) {
  .sw-dw-head__title {
    font-size: 24px;
  }
  .sw-dw-refresh {
    width: 100%;
  }
  .sw-dw-streams,
  .sw-dw-cards {
    --bs-gutter-x: 12px;
    --bs-gutter-y: 12px;
  }

  .sw-dwc .modal-dialog {
    display: flex;
    align-items: flex-end;
    margin: 0;
    max-width: 100%;
    min-height: 100%;
  }
  .sw-dwc.fade .modal-dialog {
    transform: translateY(100%);
  }
  .sw-dwc.show .modal-dialog {
    transform: none;
  }
  .sw-dwc__panel {
    --bs-modal-border-radius: 20px 20px 0 0;
    border-radius: 20px 20px 0 0;
    padding: 10px 20px calc(22px + env(safe-area-inset-bottom));
  }
  .sw-dwc__grip {
    display: block;
    width: 40px;
    height: 4px;
    border-radius: 999px;
    background: var(--sw-border-strong);
    margin: 0 auto 16px;
  }
  .sw-dwc__icon {
    margin-top: 2px;
  }
  .sw-dwc__foot {
    flex-direction: column-reverse;
  }
  .sw-dwc__btn {
    width: 100%;
  }
}
