/* ============================================================================
 * Phase A 5.0 — Campaigns tab
 * ========================================================================= */

#tab-campaigns { padding-top: 4px; }

.cam-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 18px;
  align-items: start;
}
@media (max-width: 1100px) {
  .cam-layout { grid-template-columns: 1fr; }
}

.cam-pane {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 16px;
  min-width: 0;
}

.cam-pane-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
}
.cam-pane-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.cam-pane-actions { display: flex; align-items: center; gap: 8px; }

.cam-pane-meta {
  display: flex; align-items: center; gap: 14px;
  padding: 8px 0 12px;
  font-size: 12px; color: #999;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.cam-meta-stat strong { color: #e5e5e5; font-weight: 600; }
.cam-selected-count strong { color: #ff8c00; }
.cam-clear-btn {
  margin-left: auto;
  background: transparent;
  border: 1px solid rgba(255, 140, 0, 0.4);
  color: #ffb96b;
  font-size: 11px; padding: 3px 8px; border-radius: 4px;
  cursor: pointer; text-transform: lowercase;
}
.cam-clear-btn:hover { background: rgba(255, 140, 0, 0.1); color: #fff; }

.cam-subs-wrap { max-height: 600px; overflow-y: auto; margin-top: 8px; }
.cam-subs-table th { font-size: 11px; }
.cam-subs-table tr.is-selected { background: rgba(255, 140, 0, 0.06); }
.cam-subs-table td input[type="checkbox"],
.cam-subs-table th input[type="checkbox"] { cursor: pointer; margin: 0; }

.cam-subs-table .cam-state {
  display: inline-flex; flex-wrap: wrap; gap: 3px;
  font-size: 10px;
}
.cam-state-pill {
  display: inline-block; padding: 1px 6px; border-radius: 3px;
  font-weight: 600; letter-spacing: 0.2px; white-space: nowrap;
}
.cam-state-pill.drip   { background: rgba(96, 165, 250, 0.15); color: #93c5fd; }
.cam-state-pill.camp   { background: rgba(255, 140, 0,  0.15); color: #ffb96b; }
.cam-state-pill.pend   { background: rgba(251, 191, 36, 0.15); color: #fde68a; }
.cam-state-pill.failed { background: rgba(239, 68, 68,  0.15); color: #fca5a5; }

.cam-form { display: flex; flex-direction: column; gap: 14px; margin-bottom: 16px; }
.cam-field { display: flex; flex-direction: column; gap: 6px; }
.cam-field-row { flex-direction: row; align-items: center; gap: 8px; }
.cam-field-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px;
  color: #999; font-weight: 600;
}
.cam-tz { font-weight: 400; text-transform: none; letter-spacing: 0; color: #666; font-size: 10px; }
.cam-field-hint { font-size: 11px; color: #777; line-height: 1.4; margin-top: 2px; }

.cam-select, .cam-input {
  background: #0d0d0d;
  border: 1px solid #2a2a2a;
  color: #e5e5e5;
  padding: 7px 10px; border-radius: 4px;
  font-size: 13px; font-family: inherit;
}
.cam-select:focus, .cam-input:focus { outline: none; border-color: #ff8c00; }

.cam-presets { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.cam-presets button {
  background: transparent;
  border: 1px solid rgba(255, 140, 0, 0.3);
  color: #bbb; font-size: 11px; padding: 4px 8px; border-radius: 3px;
  cursor: pointer; font-family: inherit;
}
.cam-presets button:hover {
  background: rgba(255, 140, 0, 0.08);
  border-color: rgba(255, 140, 0, 0.5);
  color: #fff;
}

.cam-send-btn {
  background: #ff8c00; border: none; color: #000;
  font-weight: 700; padding: 10px 16px; border-radius: 4px;
  cursor: pointer; font-size: 13px; letter-spacing: 0.3px;
  margin-top: 4px;
}
.cam-send-btn:hover:not(:disabled) { background: #ffa733; }
.cam-send-btn:disabled { background: #3a3a3a; color: #777; cursor: not-allowed; }

.cam-section { margin-top: 18px; }
.cam-section-header {
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 6px; margin-bottom: 8px;
}
.cam-section-header h4 {
  margin: 0; font-size: 12px; text-transform: uppercase;
  letter-spacing: 0.5px; color: #999; font-weight: 600;
}
.cam-mini-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #999; font-size: 11px; padding: 3px 8px; border-radius: 3px;
  cursor: pointer;
}
.cam-mini-btn:hover { color: #fff; border-color: rgba(255, 255, 255, 0.3); }

.cam-list { display: flex; flex-direction: column; gap: 6px; max-height: 240px; overflow-y: auto; }
.cam-list-empty { font-size: 12px; color: #555; font-style: italic; padding: 8px 0; }
.cam-list-row {
  display: grid; grid-template-columns: 1fr auto; gap: 8px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 4px; font-size: 12px; color: #ccc;
}
.cam-list-row strong { color: #fff; font-weight: 600; }
.cam-list-row .cam-row-meta { font-size: 10px; color: #777; margin-top: 2px; display: block; }
.cam-list-row .cam-row-cancel {
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5; font-size: 10px;
  padding: 3px 8px; border-radius: 3px;
  cursor: pointer; align-self: start;
}
.cam-list-row .cam-row-cancel:hover { background: rgba(239, 68, 68, 0.1); }
.cam-list-row.status-sent     { border-left: 3px solid #22c55e; }
.cam-list-row.status-pending  { border-left: 3px solid #fbbf24; }
.cam-list-row.status-sending  { border-left: 3px solid #60a5fa; }
.cam-list-row.status-failed   { border-left: 3px solid #ef4444; }
.cam-list-row.status-canceled { border-left: 3px solid #6b7280; opacity: 0.65; }

.cam-result-backdrop {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 20px;
}
.cam-result-dialog {
  background: #0d0d0d; border: 1px solid #2a2a2a; border-radius: 8px;
  padding: 24px 28px; max-width: 520px; width: 100%;
  color: #e5e5e5; font-size: 13px;
}
.cam-result-dialog h3 { margin: 0 0 14px; font-size: 18px; color: #fff; }
.cam-result-counts {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  margin: 0 0 18px;
}
.cam-result-count {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 10px; border-radius: 4px; text-align: center;
}
.cam-result-count .n { font-size: 22px; font-weight: 700; display: block; margin-bottom: 2px; }
.cam-result-count .lbl { font-size: 10px; text-transform: uppercase; letter-spacing: 0.6px; color: #999; }
.cam-result-count.ok      .n { color: #22c55e; }
.cam-result-count.dup     .n { color: #fbbf24; }
.cam-result-count.skipped .n { color: #999;  }

.cam-result-close {
  margin-top: 12px;
  background: #2a2a2a; color: #e5e5e5;
  border: none; padding: 8px 16px; border-radius: 4px;
  cursor: pointer; font-size: 13px;
}
.cam-result-close:hover { background: #3a3a3a; }
