/* Campaigns page. Matches the composer's spacing and controls so the two
   marketing pages feel like one product. */

/* Same container as Send email and Templates: full width up to 1420px, then
   centred. Without the auto margin the page pinned to the left edge and left
   most of the screen empty, which read as a broken layout rather than a
   narrow one. The outer inset comes from #senditto-platform-root, as on the
   other pages, so the padding here is vertical only. */
.pc-page {
  width: 100%;
  max-width: min(1420px, 100%);
  margin: 0 auto;
  min-width: 0;
  padding: 4px 0 60px;
}

.pc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.pc-head small { font-size: 11px; letter-spacing: .09em; color: var(--muted, #7c8598); font-weight: 600; }
.pc-head h1 { margin: 6px 0 4px; font-size: 26px; letter-spacing: -0.02em; }
.pc-head p { margin: 0; color: var(--muted, #7c8598); font-size: 13.5px; max-width: 62ch; line-height: 1.55; }

.pc-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 13px; border-radius: 9px; font-size: 13px; font-weight: 500;
  border: 1px solid rgba(127, 137, 158, 0.28); background: transparent; color: inherit;
  cursor: pointer; transition: background .14s ease, border-color .14s ease;
}
.pc-btn:hover { background: rgba(127, 137, 158, 0.1); }
.pc-btn.primary { background: #2f6df6; border-color: #2f6df6; color: #fff; }
.pc-btn.primary:hover { background: #2860e0; }
.pc-btn.danger { color: #c0392b; border-color: rgba(192, 57, 43, 0.3); }
.pc-btn[disabled] { opacity: .55; cursor: default; }

.pc-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 22px 0 18px; }
.pc-stat {
  border: 1px solid rgba(127, 137, 158, 0.2); border-radius: 12px; padding: 13px 15px;
  display: flex; flex-direction: column; gap: 5px;
}
.pc-stat span { font-size: 11.5px; color: var(--muted, #7c8598); }
.pc-stat b { font-size: 21px; font-weight: 600; letter-spacing: -0.01em; }

.pc-table-wrap { border: 1px solid rgba(127, 137, 158, 0.2); border-radius: 12px; overflow-x: auto; }
.pc-table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 780px; }
.pc-table th {
  text-align: left; font-weight: 500; font-size: 11.5px; color: var(--muted, #7c8598);
  padding: 11px 14px; border-bottom: 1px solid rgba(127, 137, 158, 0.2);
}
.pc-table td { padding: 12px 14px; border-bottom: 1px solid rgba(127, 137, 158, 0.12); vertical-align: middle; }
.pc-table tr:last-child td { border-bottom: 0; }
.pc-table td small { display: block; color: var(--muted, #7c8598); font-size: 12px; margin-top: 2px; }
.pc-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

.pc-tag, .pc-badge {
  display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 11.5px;
  border: 1px solid rgba(127, 137, 158, 0.3); color: var(--muted, #7c8598); white-space: nowrap;
}
.pc-badge.good { color: #15803d; border-color: rgba(21, 128, 61, 0.35); background: rgba(21, 128, 61, 0.08); }
.pc-badge.blue { color: #1d4ed8; border-color: rgba(29, 78, 216, 0.35); background: rgba(29, 78, 216, 0.08); }
.pc-badge.amber { color: #b45309; border-color: rgba(180, 83, 9, 0.35); background: rgba(180, 83, 9, 0.08); }
.pc-badge.bad { color: #b91c1c; border-color: rgba(185, 28, 28, 0.35); background: rgba(185, 28, 28, 0.08); }

.pc-empty { border: 1px dashed rgba(127, 137, 158, 0.32); border-radius: 12px; padding: 40px 24px; text-align: center; }
.pc-empty h3 { margin: 0 0 6px; font-size: 16px; }
.pc-empty p { margin: 0; color: var(--muted, #7c8598); font-size: 13.5px; }

.pc-note { color: var(--muted, #7c8598); font-size: 12.5px; line-height: 1.55; margin: 0; }

/* Editor */
.pc-modal { position: fixed; inset: 0; z-index: 900; display: grid; place-items: center; padding: 20px; }
.pc-backdrop { position: absolute; inset: 0; border: 0; background: rgba(8, 10, 16, 0.55); backdrop-filter: blur(2px); cursor: pointer; }
.pc-dialog {
  position: relative; width: min(680px, 100%); max-height: 88vh; overflow-y: auto;
  border-radius: 16px; padding: 26px 28px; background: var(--panel, #fff);
  border: 1px solid rgba(127, 137, 158, 0.22); box-shadow: 0 24px 60px rgba(8, 10, 16, 0.28);
}
.pc-dialog h2 { margin: 0 0 18px; font-size: 19px; }
.pc-close { position: absolute; top: 14px; right: 14px; border: 0; background: transparent; font-size: 15px; cursor: pointer; color: var(--muted, #7c8598); }
.pc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pc-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 11.5px; color: var(--muted, #7c8598); min-width: 0; }
.pc-grid .full { grid-column: 1 / -1; }
.pc-input {
  width: 100%; padding: 9px 11px; border-radius: 9px; font: inherit; font-size: 13.5px;
  border: 1px solid rgba(127, 137, 158, 0.3); background: transparent; color: inherit;
}
.pc-input:focus { outline: none; border-color: #2f6df6; box-shadow: 0 0 0 3px rgba(47, 109, 246, 0.14); }
textarea.pc-input { resize: vertical; min-height: 70px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.pc-modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; }

.pc-toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 1000;
  padding: 11px 17px; border-radius: 10px; font-size: 13.5px; max-width: min(560px, 92vw);
  background: #11151c; color: #f2f4f8; box-shadow: 0 12px 34px rgba(8, 10, 16, 0.3);
}

@media (max-width: 760px) {
  .pc-page { padding: 4px 0 48px; }
  .pc-grid { grid-template-columns: 1fr; }
}
@media (prefers-color-scheme: dark) {
  .pc-dialog { background: #141922; }
  .pc-toast { background: #e9edf4; color: #11151c; }
}
