:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #eef2f7;
  color: #111827;
  --bg: #eef2f7;
  --panel: #ffffff;
  --text: #111827;
  --ink: #111827;
  --muted: #475569;
  --line: #cbd5e1;
  --line-strong: #94a3b8;
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --accent-soft: #eff6ff;
  --accent-dark: #1d4ed8;
  --soft: #f8fafc;
  --danger: #b91c1c;
  --danger-strong: #991b1b;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 12px 28px rgba(15, 23, 42, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(37, 99, 235, 0.08), rgba(37, 99, 235, 0) 210px),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

.app-header {
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 10px rgba(15, 23, 42, 0.05);
}

.header-inner,
.shell {
  width: min(1360px, calc(100% - 32px));
  margin: 0 auto;
}

.header-inner {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.brand-logo {
  width: 172px;
  height: auto;
  display: block;
}

.brand-copy {
  border-left: 1px solid var(--line);
  padding-left: 18px;
  min-width: 0;
}

.brand {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0;
}

.subtitle {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: 7px;
  padding: 9px 12px;
  font-weight: 750;
  cursor: pointer;
}

button.active,
button:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

button:disabled,
button:disabled:hover {
  background: #f2f4f7;
  border-color: var(--line);
  color: var(--muted);
  cursor: not-allowed;
}

.primary-launch-button {
  min-height: 46px;
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
}

.primary-launch-button:hover:not(:disabled) {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #ffffff;
}

.secondary {
  background: #ffffff;
  color: #1f2937;
}

.status-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.header-button {
  width: auto;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #ffffff;
  color: #1f2937;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 850;
}

.header-button:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.env-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  color: #334155;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--muted);
  flex: 0 0 auto;
  box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.18);
}

.status-ok .status-dot,
.status-dot.status-ok {
  background: #16a34a;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.18);
}

.status-warn .status-dot,
.status-dot.status-warn {
  background: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

.status-err .status-dot,
.status-failed .status-dot,
.status-dot.status-err,
.status-dot.status-failed {
  background: #dc2626;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.18);
}

.status-running .status-dot,
.status-active .status-dot,
.status-dot.status-running,
.status-dot.status-active {
  background: var(--accent);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18);
}

.shell {
  padding: 22px 0 44px;
}

.tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
  overflow-x: auto;
}

.tab {
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
  background: transparent;
  color: #475569;
  padding: 11px 16px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
}

.tab.active {
  background: #ffffff;
  color: var(--ink);
  border-color: var(--line);
  position: relative;
  top: 1px;
}

.tab.active::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 0;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: var(--accent);
}

.tab:hover:not(.active):not(.disabled) {
  background: rgba(255, 255, 255, 0.72);
  color: var(--accent-strong);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 17px;
  min-width: 0;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.launch-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 350px);
  gap: 18px;
  align-items: start;
  min-width: 0;
}

.form-stack,
.side-stack {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.sticky {
  position: sticky;
  top: 16px;
}

.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 13px;
}

.panel-title h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.3;
  letter-spacing: 0;
}

.panel-title span {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.beta-label {
  color: #991b1b !important;
}

h1 {
  margin: 0 0 14px;
  font-size: 16px;
  line-height: 1.3;
  letter-spacing: 0;
}

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

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

.field-grid.cols-2 {
  grid-template-columns: repeat(2, minmax(220px, 1fr));
}

.field-grid.cols-3 {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
}

.field-grid .wide {
  grid-column: 1 / -1;
}

.muted-copy {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

label {
  display: grid;
  gap: 6px;
  color: #1f2937;
  font-size: 13px;
  font-weight: 750;
  min-width: 0;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  border: 1px solid #aeb8c6;
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  padding: 9px 10px;
  font: inherit;
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--line-strong);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
}

.upload-box {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

.import-box {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

.permission-status {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
}

.permission-status.owner {
  border-color: #9bc7bc;
  color: var(--accent-dark);
}

.permission-status.locked {
  border-color: #e2b7b2;
  color: var(--danger);
}

.upload-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.upload-head h2 {
  margin: 0;
  font-size: 15px;
}

.upload-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.validation-note {
  margin-top: 10px;
  border: 1px solid #bfdbfe;
  border-radius: 7px;
  background: var(--accent-soft);
  color: #1e3a8a;
  padding: 9px 10px;
  font-size: 12px;
  line-height: 1.45;
}

.launch-live-gates {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 13px;
  padding: 11px;
  border: 1px solid #d7dee8;
  border-radius: 7px;
  background: var(--soft);
}

.launch-live-gates .validation-note {
  grid-column: 1 / -1;
  margin-top: 0;
}

.checkline {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkline input {
  width: 16px;
  min-height: 16px;
}

.upload-list {
  display: grid;
  gap: 6px;
}

.upload-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
}

.upload-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-row span,
.upload-empty {
  color: var(--muted);
  font-size: 12px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.vertical-actions {
  align-items: stretch;
  flex-direction: column;
  margin-top: 0;
}

.vertical-actions button {
  width: 100%;
}

.launch-import-dropzone {
  position: relative;
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 118px;
  border: 1px dashed #93c5fd;
  border-radius: 8px;
  background: #eff6ff;
  color: #1e3a8a;
  text-align: center;
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}

.launch-import-dropzone:hover,
.launch-import-dropzone.dragover {
  border-color: var(--accent);
  background: #dbeafe;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.launch-import-dropzone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.launch-import-dropzone strong {
  font-size: 15px;
}

.launch-import-dropzone span {
  color: #475569;
  font-size: 13px;
}

.launch-import-result {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.launch-import-summary {
  border: 1px solid #bfdbfe;
  border-radius: 7px;
  background: #f8fbff;
  color: #1e3a8a;
  padding: 9px 10px;
  font-size: 12px;
  line-height: 1.45;
}

.launch-import-summary.err {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.launch-import-summary.warn {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.launch-import-summary strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
}

.launch-import-summary div {
  overflow-wrap: anywhere;
}

.launch-readiness {
  margin-top: 12px;
  border: 1px solid #d7dee8;
  border-radius: 7px;
  background: var(--soft);
  color: #334155;
  padding: 9px 10px;
  font-size: 12px;
  line-height: 1.45;
}

.step-list {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.step {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
  border: 1px solid #d7dee8;
  border-radius: 7px;
  background: #ffffff;
  color: #334155;
  padding: 8px 9px;
  font-size: 12px;
  font-weight: 800;
}

.step span {
  color: #64748b;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.step.running {
  border-color: #93c5fd;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.step.ok {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.step.skipped {
  border-color: #e2e8f0;
  background: #f8fafc;
  color: #64748b;
}

.step.failed {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.safety-panel {
  display: grid;
  gap: 8px;
}

.campaign-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.summary-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 800;
}

.summary-pill strong {
  color: var(--ink);
  font-size: 13px;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 160px 140px auto;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.campaign-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 2px 0 12px;
}

.campaign-main-toolbar {
  align-items: center;
}

.campaign-count {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.campaign-tools,
.campaign-tools-stacked {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.campaign-filterbar,
.campaign-actionbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.campaign-search {
  width: min(360px, 100%);
}

.campaign-view {
  width: auto;
  min-width: 130px;
}

.compact-button {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 12px;
}

.campaign-import-panel {
  display: grid;
  gap: 10px;
  margin: 10px 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  padding: 10px;
}

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

.compact-pager {
  justify-content: flex-start;
  margin-top: 8px;
}

.history-toolbar {
  grid-template-columns: minmax(240px, 1fr) 170px 130px auto;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}

.bulkbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.bulkbar span {
  color: var(--muted);
  font-size: 13px;
  min-width: 80px;
}

.bulkbar button {
  min-height: 32px;
  padding: 6px 9px;
  font-size: 12px;
}

.optimize-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.optimize-chip {
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
  background: var(--soft);
}

.optimize-chip strong,
.optimize-chip span {
  display: block;
}

.optimize-chip strong {
  color: var(--muted);
  font-size: 12px;
}

.optimize-chip span {
  margin-top: 4px;
  font-size: 16px;
  font-weight: 750;
}

.bucket-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 94px;
  min-height: 28px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
}

.pager span {
  min-width: 120px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.history-panel {
  margin-top: 14px;
  padding: 0;
}

.history-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  min-height: 58px;
  border: 0;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 13px 15px;
  text-align: left;
}

.history-toggle:hover {
  background: var(--soft);
  color: var(--ink);
}

.history-toggle-main strong,
.history-toggle-main em {
  display: block;
}

.history-toggle-main strong {
  font-size: 15px;
  font-style: normal;
}

.history-toggle-main em {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 650;
}

.history-toggle-side {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.history-chevron {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.history-panel:not(.collapsed) .history-chevron {
  transform: rotate(180deg);
}

.history-body {
  border-top: 1px solid var(--line);
  padding: 13px 15px 15px;
}

.output {
  min-height: 120px;
  margin: 16px 0 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101418;
  color: #e8f1f2;
  overflow: auto;
  white-space: pre-wrap;
}

.output:empty {
  display: none;
}

.small-output {
  min-height: 80px;
  max-height: 260px;
}

.list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.compact-list {
  margin-top: 0;
}

.row {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

.row:hover {
  border-color: #b6c3d3;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}

.campaign-row:has(input[type="checkbox"]:checked) {
  border-color: #93c5fd;
  background: #f8fbff;
  box-shadow: inset 3px 0 0 var(--accent), 0 1px 2px rgba(15, 23, 42, 0.04);
}

.campaign-table {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}

.campaign-table-head,
.campaign-table-row {
  display: grid;
  grid-template-columns: minmax(280px, 1.7fr) minmax(120px, 0.6fr) minmax(150px, 0.7fr) minmax(140px, 0.7fr) minmax(260px, 1fr);
  gap: 0;
  align-items: stretch;
}

.campaign-table-head {
  min-height: 42px;
  background: var(--soft);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.campaign-table-head span,
.campaign-cell {
  padding: 10px 12px;
  min-width: 0;
}

.campaign-table-row {
  border-bottom: 1px solid var(--line);
}

.campaign-table-row:last-child {
  border-bottom: 0;
}

.campaign-table-row:has(input[type="checkbox"]:checked) {
  background: #f8fbff;
  box-shadow: inset 3px 0 0 var(--accent);
}

.campaign-cell {
  display: grid;
  align-content: center;
  gap: 4px;
  color: #334155;
  font-size: 12px;
}

.campaign-cell strong {
  color: var(--ink);
  font-size: 13px;
}

.campaign-cell span {
  overflow-wrap: anywhere;
}

.campaign-cell-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.campaign-cell-status .status-dot {
  width: 12px;
  height: 12px;
}

.campaign-cell-links,
.campaign-cell-metrics {
  color: var(--muted);
  font-weight: 700;
}

.campaign-cell-actions {
  justify-items: end;
}

.campaign-details-toggle {
  margin-top: 6px;
  min-height: 28px;
  padding: 5px 9px;
  font-size: 12px;
}

.campaign-table-detail {
  grid-column: 1 / -1;
  margin: 0;
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
}

.row strong {
  font-size: 14px;
  line-height: 1.3;
}

.row span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.job-row {
  display: grid;
  gap: 8px;
}

.job-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.campaign-titleline {
  min-width: 0;
}

.campaign-select {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  color: var(--text);
}

.campaign-select input {
  width: 16px;
  min-height: 16px;
  margin-top: 2px;
}

.campaign-select strong,
.campaign-select span span {
  display: block;
  overflow-wrap: anywhere;
}

.job-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.job-title strong {
  overflow-wrap: anywhere;
}

.job-meta,
.job-errors {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.job-errors {
  color: var(--danger);
}

.job-steps {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.job-step {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px;
  background: #fbfcfc;
}

.job-step strong,
.job-step span {
  display: block;
  font-size: 12px;
}

.job-step span {
  color: var(--muted);
  margin-top: 2px;
}

.job-detail {
  margin-top: 2px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.job-detail[hidden] {
  display: none;
}

.child-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfc;
}

.child-summary strong,
.child-summary span,
.child-issues strong,
.child-issue strong,
.child-issue span {
  font-size: 12px;
}

.child-summary span,
.child-issue span {
  color: var(--muted);
}

.child-issues {
  display: grid;
  gap: 6px;
  margin-bottom: 8px;
}

.child-issue {
  display: grid;
  grid-template-columns: minmax(0, 180px) minmax(0, 1fr);
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.campaign-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.campaign-actions button {
  min-height: 32px;
  padding: 6px 9px;
  font-size: 12px;
}

.campaign-actions button:disabled {
  background: #f1f5f9;
  color: #94a3b8;
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 20, 24, 0.48);
}

.modal-panel {
  position: relative;
  width: min(940px, 100%);
  max-height: min(760px, calc(100vh - 36px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
  box-shadow: 0 20px 60px rgba(16, 20, 24, 0.28);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.modal-head h2 {
  margin: 0;
  font-size: 18px;
}

.modal-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.modal-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.modal-list,
.status-body {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.status-fact {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px;
  background: #fbfcfc;
}

.status-fact strong,
.status-fact span {
  display: block;
}

.status-fact strong {
  font-size: 12px;
  color: var(--muted);
}

.status-fact span {
  margin-top: 3px;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.settings-row {
  display: grid;
  gap: 3px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfc;
}

.settings-row strong {
  font-size: 13px;
}

.settings-row span {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .header-inner,
  .shell {
    width: min(100% - 20px, 1360px);
  }

  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 0;
  }

  .brand-lockup {
    gap: 12px;
    width: 100%;
  }

  .brand-logo {
    width: 132px;
  }

  .brand-copy {
    padding-left: 12px;
  }

  .header-actions {
    align-items: stretch;
    width: 100%;
  }

  .header-actions button,
  .env-pill {
    flex: 1 1 auto;
  }

  .shell {
    padding: 14px 0 28px;
  }

  .tabs {
    gap: 4px;
    margin-bottom: 12px;
  }

  .tab {
    flex: 1 0 auto;
    padding: 10px 11px;
    text-align: center;
  }

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

  .launch-grid,
  .field-grid.cols-2,
  .field-grid.cols-3,
  .launch-live-gates {
    grid-template-columns: 1fr;
  }

  .sticky {
    position: static;
  }

  .toolbar {
    grid-template-columns: 1fr;
  }

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

  .pager {
    justify-content: flex-start;
  }

  .upload-head,
  .actions {
    align-items: stretch;
    flex-direction: column;
  }

  .upload-row {
    grid-template-columns: 1fr;
  }

  .job-main,
  .modal-head {
    flex-direction: column;
  }

  .campaign-toolbar,
  .campaign-filterbar,
  .campaign-actionbar {
    align-items: stretch;
    flex-direction: column;
  }

  .campaign-count,
  .campaign-search,
  .campaign-view,
  .campaign-actionbar button {
    width: 100%;
  }

  .campaign-table {
    border: 0;
    background: transparent;
    gap: 8px;
  }

  .campaign-table-head {
    display: none;
  }

  .campaign-table-row {
    display: grid;
    grid-template-columns: 1fr;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    overflow: hidden;
  }

  .campaign-cell {
    padding: 8px 10px;
  }

  .campaign-cell-actions {
    justify-items: stretch;
  }

  .modal {
    padding: 8px;
  }

  .modal-panel {
    max-height: calc(100vh - 16px);
  }
}
