@import url("./admin-core.css?v=20260405-css-foundation-1");
@import url("./admin-shells.css?v=20260405-css-foundation-1");
@import url("./admin-ops.css?v=20260405-css-foundation-1");

/* Remaining module-specific styles stay here during the progressive split.
   No global dashboard/bootstrap primitives should be redefined here once
   they have been moved into admin-core/admin-shells/admin-ops. */


.toast-zone {
  z-index: 1090;
}

.toast-shell {
  --toast-accent: #3a5fe3;
  background: #fff;
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.12);
  border-radius: 14px;
  min-width: 280px;
  border: 1px solid #e4e9f2;
  border-left: 4px solid var(--toast-accent);
}

.toast-icon {
  color: var(--toast-accent);
  font-size: 1.1rem;
}

.toast-message {
  font-size: 13px;
}

.toast-close-sm {
  font-size: 0.65rem;
}

.copy-size-sm {
  font-size: 0.85rem;
}

.insight-tier-caption {
  font-size: 10px;
}

.conversions-filter-select {
  max-width: 280px;
}

.empty-state-icon-soft {
  font-size: 32px;
  opacity: 0.3;
}

.campaign-table-wrap {
  max-height: 62vh;
  overflow-y: auto;
}

.campaign-scroll-wrap {
  max-height: 42vh;
  overflow-y: auto;
}

.table thead.sticky-top {
  z-index: 2;
}

@media (min-width: 1400px) {
  .campaign-table-wrap {
    max-height: 70vh;
  }

  .campaign-scroll-wrap {
    max-height: 50vh;
  }

  .insights-leads-scroll {
    max-height: 40vh;
  }
}

@media (min-width: 1200px) {
  .campaign-overview-side {
    position: sticky;
    top: 16px;
    align-self: flex-start;
  }
}

@media (max-width: 991.98px) {
  .campaign-hero {
    padding: 0.85rem 1rem;
  }

  .campaign-title-main h2 {
    font-size: 1.55rem;
  }

  .campaign-table-wrap {
    max-height: 52vh;
  }

  .campaign-scroll-wrap {
    max-height: 36vh;
  }

  .campaign-kpi-card {
    min-height: 80px;
  }

  .campaign-kpi-card .kpi-label {
    font-size: 0.68rem;
  }

  .insights-leads-scroll {
    max-height: 30vh;
  }
}

.campaign-builder-shell,
.campaign-editor-shell {
  max-width: 1440px;
  margin: 0 auto;
}

.campaign-builder-header,
.campaign-editor-header {
  padding: 16px 17px;
  border: 1px solid var(--ui-border);
  border-radius: 15px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: var(--ui-shadow-sm);
}

.campaign-builder-header h2,
.campaign-editor-header h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.06em;
  color: var(--ui-text-strong);
}

.campaign-builder-header .small,
.campaign-editor-header .small {
  font-size: 12px;
}

.builder-card,
.builder-preview,
.editor-card,
.editor-preview {
  overflow: hidden;
}

.builder-card,
.builder-preview,
.editor-card,
.editor-preview {
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-lg);
  background: var(--ui-surface);
  box-shadow: var(--ui-shadow-sm);
}

.builder-card-header,
.editor-card-header {
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
  border-bottom: 1px solid #edf1f5;
  color: var(--ui-text-strong);
  font-size: 11.5px;
  font-weight: 700;
  padding: 12px 14px;
}

.builder-card .card-body,
.builder-preview .card-body,
.editor-card .card-body,
.editor-preview .card-body {
  padding: 14px;
}

.campaign-builder-form .form-label,
.campaign-editor-form .form-label {
  font-size: 10.5px;
}

.campaign-builder-form .form-control,
.campaign-builder-form .form-select,
.campaign-editor-form .form-control,
.campaign-editor-form .form-select {
  min-height: 34px;
  font-size: 11.5px;
}

.campaign-builder-form .form-text,
.campaign-editor-form .form-text {
  font-size: 11px;
}

.format-select {
  max-width: 108px;
}

.builder-summary,
.editor-summary,
.editor-note,
.builder-details,
.editor-details,
.mms-box,
.deliverability-panel {
  padding: 11px 12px;
}

.builder-summary,
.editor-summary,
.builder-details[open],
.editor-details[open],
.mms-box.is-active {
  border-color: var(--ui-accent-line);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.builder-details summary,
.editor-details summary {
  cursor: pointer;
  list-style: none;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ui-text-strong);
}

.builder-details summary::-webkit-details-marker,
.editor-details summary::-webkit-details-marker {
  display: none;
}

.message-variable-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.message-variable-actions .btn {
  border-radius: 999px !important;
  padding: 0.28rem 0.56rem;
  font-size: 10.5px;
}

.message-variable-actions .btn-outline-secondary {
  border-color: var(--ui-accent-line);
  background: var(--ui-accent-soft);
  color: var(--ui-accent-strong);
}

.message-textarea {
  min-height: 110px;
  resize: vertical;
}

.deliverability-panel {
  background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
}

.preview-phone-frame {
  min-height: 128px;
  border: 1px solid var(--ui-accent-line);
  border-radius: 16px !important;
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
}

.preview-bubble {
  max-width: 92%;
  background: #ffffff;
  border: 1px solid #dfe7fb;
  box-shadow: 0 10px 18px rgba(58, 95, 227, 0.08);
}

.targeting-mode-switch .btn {
  min-height: 28px;
  padding: 0.28rem 0.58rem;
  font-size: 10.5px;
}

.targeting-mode-switch .btn-check:checked + .btn {
  background: linear-gradient(180deg, var(--ui-accent) 0%, var(--ui-accent-strong) 100%);
  border-color: var(--ui-accent-strong);
  color: #ffffff;
}

.compact-switch .form-check-input {
  width: 1.9rem;
  height: 1.05rem;
}

.create-dropzone {
  border-color: var(--ui-accent-line) !important;
  background: var(--ui-accent-soft) !important;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.create-dropzone.border-primary {
  background: #e7eeff !important;
}

.csv-preview-box .alert {
  margin-bottom: 0;
}

.import-upload-panel {
  display: flex;
  flex-direction: column;
}

.import-upload-shell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 11px 12px;
  border-radius: 11px;
  border: 1px dashed var(--ui-accent-line);
  background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
  cursor: pointer;
  transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}

.import-upload-shell:hover {
  border-color: rgba(58, 95, 227, 0.45);
  background: #f8fbff;
  box-shadow: inset 0 0 0 1px rgba(58, 95, 227, 0.04);
}

.import-upload-shell.is-ready {
  border-style: solid;
  border-color: rgba(15, 138, 93, 0.22);
  background: #f1fbf6;
}

.import-upload-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, var(--ui-accent) 0%, var(--ui-accent-strong) 100%);
  color: #ffffff;
  font-size: 15px;
  flex: 0 0 auto;
}

.import-upload-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1 1 auto;
  min-width: 0;
}

.import-upload-copy strong {
  color: var(--ui-text-strong);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.import-upload-copy span {
  color: var(--ui-muted);
  font-size: 10px;
  line-height: 1.4;
}

.import-upload-copy code {
  padding: 1px 5px;
  font-size: 10px;
}

.import-upload-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 0;
  border: 0;
  background: transparent;
  color: var(--ui-accent-strong);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  flex: 0 0 auto;
}

.import-preview-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
  border: 1px solid rgba(15, 138, 93, 0.14);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f4fbf8 100%);
}

.import-preview-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.import-preview-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ui-success);
}

.import-preview-copy strong {
  font-size: 11px;
  color: var(--ui-text-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.import-preview-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.builder-preview .badge,
.editor-preview .badge,
.campaign-builder-form .badge.bg-dark,
.campaign-editor-form .badge.bg-dark {
  background: var(--ui-accent-soft) !important;
  color: var(--ui-accent-strong) !important;
  border: 1px solid var(--ui-accent-line);
}

.mms-box[hidden] {
  display: none !important;
}

.mms-box .mms-fields-row > [class*='col-'] {
  display: flex;
  flex-direction: column;
}

.mms-upload-shell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 11px 12px;
  border-radius: 11px;
  border: 1px dashed var(--ui-accent-line);
  background: #ffffff;
  cursor: pointer;
  transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}

.mms-upload-shell:hover {
  border-color: rgba(58, 95, 227, 0.45);
  background: #f8fbff;
  box-shadow: inset 0 0 0 1px rgba(58, 95, 227, 0.04);
}

.mms-upload-shell.is-ready {
  border-style: solid;
  border-color: rgba(15, 138, 93, 0.22);
  background: #f1fbf6;
}

.mms-upload-shell.is-pending {
  border-style: solid;
  border-color: rgba(245, 158, 11, 0.32);
  background: #fff8ea;
}

.mms-upload-shell.is-error {
  border-style: solid;
  border-color: rgba(220, 38, 38, 0.24);
  background: #fff3f3;
}

.mms-upload-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, var(--ui-accent) 0%, var(--ui-accent-strong) 100%);
  color: #ffffff;
  font-size: 15px;
  flex: 0 0 auto;
}

.mms-upload-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}

.mms-upload-copy strong {
  color: var(--ui-text-strong);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mms-upload-copy span {
  color: var(--ui-muted);
  font-size: 10px;
  line-height: 1.4;
}

.mms-upload-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 0;
  border: 0;
  background: transparent;
  color: var(--ui-accent-strong);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  flex: 0 0 auto;
}

.mms-subject-col {
  justify-content: flex-start;
}

.builder-preview .card-header,
.editor-preview .card-header {
  background: linear-gradient(180deg, #f8fbff 0%, #eef3ff 100%);
}

.builder-summary,
.editor-summary {
  padding: 12px 14px;
}

.dashboard-shell .status-badge,
.dashboard-shell .badge,
.campaign-builder-shell .status-badge,
.campaign-editor-shell .status-badge {
  box-shadow: none;
}

.progress {
  background: #eef2f7;
}

.btn-icon-compact {
  min-width: 30px;
  padding: 0.26rem 0.42rem;
  line-height: 1;
}

.table-cell-muted {
  font-size: 11px;
  color: var(--ui-muted);
}

.metric-value.metric-accent {
  color: var(--ui-accent-strong);
}

.metric-value.metric-warning {
  color: var(--ui-warning);
}

.metric-value.metric-success {
  color: var(--ui-success);
}

.sticky-card {
  top: 18px;
}

.preview-message-copy {
  font-size: 13px;
}

.spin-count-select {
  width: auto;
  min-width: 140px;
}

.spin-count-select.edit {
  max-width: 220px;
}

.empty-state-icon-sm {
  font-size: 32px;
  opacity: 0.3;
}

.empty-state-icon-lg {
  font-size: 48px;
  opacity: 0.3;
}

.table-scroll-260,
.table-scroll-420,
.table-scroll-520 {
  overflow-y: auto;
}

.table-scroll-260 {
  max-height: 260px;
}

.table-scroll-420 {
  max-height: 420px;
}

.table-scroll-520 {
  max-height: 520px;
}

.table-head-sticky thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f9fbfd;
}

@media (max-width: 1200px) {
  .builder-preview,
  .editor-preview {
    position: static !important;
  }
}

@media (max-width: 992px) {
}

@media (max-width: 768px) {
  .campaign-builder-header h2,
  .campaign-editor-header h2 {
    font-size: 22px;
  }

  .bulk-action-bar,
  .bulk-bar {
    padding: 10px 14px;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .bulk-action-bar .btn,
  .bulk-bar .btn {
    font-size: 11px;
    padding: 4px 8px;
  }

  .mms-upload-shell {
    padding: 12px;
  }

  .import-upload-shell {
    padding: 12px;
  }

  .mms-upload-action {
    display: none;
  }

  .import-upload-action {
    display: none;
  }
}

@media (max-width: 576px) {
  .campaign-builder-header,
  .campaign-editor-header,
  .builder-stat-box strong {
    font-size: 18px;
  }
}
