:root {
  --bg: #f3f6fb;
  --surface: #ffffff;
  --text: #142033;
  --muted: #5a6b82;
  --accent: #0b5fff;
  --accent-soft: #e8f0ff;
  --border: #d7deea;
  --danger: #b42318;
  --ok: #1f7a45;
  --sidebar: #0f1b2d;
  --sidebar-text: #d7e0ef;
  --sidebar-active: #1a2f4d;
  --warn: #9a6700;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  background:
    radial-gradient(1200px 500px at 10% -10%, #dfeaff 0%, transparent 55%),
    linear-gradient(180deg, #eef3fb 0%, var(--bg) 40%, #f8fafc 100%);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.portal-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

.portal-sidebar {
  background: linear-gradient(180deg, var(--sidebar) 0%, #16263d 100%);
  color: var(--sidebar-text);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.brand {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  padding: 8px 10px 18px;
}

.brand span {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  color: #8fa3c1;
  margin-top: 4px;
}

.nav-link {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 0.95rem;
}

.nav-link:hover { background: rgba(255,255,255,0.06); text-decoration: none; }
.nav-link.active {
  background: var(--sidebar-active);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}

.nav-section {
  margin-top: 14px;
  padding: 0 12px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #7d90ad;
}

.portal-main {
  padding: 24px 28px 64px;
  max-width: 1100px;
}

h1 { margin: 0 0 8px; font-size: 1.6rem; }
h2 { margin: 0 0 12px; font-size: 1.15rem; }
.subtitle { margin: 0 0 20px; color: var(--muted); line-height: 1.45; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 8px 24px rgba(20, 40, 80, 0.04);
}

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

.stat {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: #fafcff;
}
.stat .label { color: var(--muted); font-size: 0.82rem; margin-bottom: 6px; }
.stat .value { font-size: 1.25rem; font-weight: 700; }

label { display: block; font-size: 0.9rem; font-weight: 600; margin-bottom: 6px; }
input, select, button, textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border);
  padding: 10px 12px;
  font: inherit;
  background: #fff;
}
button {
  cursor: pointer;
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  font-weight: 600;
}
button.secondary {
  background: #fff;
  color: var(--text);
  border-color: var(--border);
}
button.danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}
button:disabled { opacity: 0.55; cursor: not-allowed; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 40, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}
.modal-backdrop.hidden { display: none; }
.modal-card {
  width: min(560px, 100%);
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: 0 18px 48px rgba(16, 24, 40, 0.18);
  padding: 18px 18px 16px;
}
.modal-card h2 { margin: 0 0 8px; font-size: 1.25rem; }
.modal-card .subtitle { margin: 0 0 14px; }
.end-option {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
  cursor: pointer;
}
.end-option.selected { border-color: var(--accent); background: #f4f7fd; }
.end-option.danger.selected { border-color: var(--danger); background: #fff5f4; }
.end-option strong { display: block; margin-bottom: 4px; }
.end-option p { margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.4; }
.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-top: 14px;
}
.tech-details {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  background: #f8fafc;
}
.tech-details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--muted);
}
.tech-pre {
  white-space: pre-wrap;
  font-size: 0.8rem;
  margin: 8px 0 0;
  overflow: auto;
  max-height: 320px;
}
.readable-panel h3, .readable-panel h4 { margin: 12px 0 6px; }
.readable-panel ul { margin: 0 0 8px; padding-left: 20px; }
.readable-panel li { margin: 4px 0; }
.workspace-checklist {
  display: grid;
  gap: 10px;
  margin: 12px 0;
}
.workspace-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: #fff;
}
.workspace-item.complete { border-color: #b7e2c7; background: #f3fbf6; }
.workspace-item.ready { border-color: #9db7f0; background: #f4f7fd; }
.workspace-item.attention { border-color: #f0d29a; background: #fffaf0; }
.workspace-item.waiting { border-color: #c9d4e5; background: #f7f9fc; }
.workspace-item-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.workspace-item-actions button, .workspace-item-actions a {
  width: auto;
}
.campaign-identity-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 4px;
}
.next-action-banner {
  border-radius: 12px;
  padding: 12px 14px;
  margin: 12px 0;
  border: 1px solid #9db7f0;
  background: #eef3fc;
  font-weight: 600;
}
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.9rem;
}
.breadcrumb a { color: var(--accent); text-decoration: none; font-weight: 600; }
.breadcrumb .sep { opacity: 0.5; }


.banner {
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
  background: #f0f4fb;
  color: var(--muted);
  line-height: 1.45;
}
.banner.warn { background: #fff6e5; border-color: #f0d29a; color: var(--warn); }
.banner.ok { background: #e8f7ee; border-color: #b7e2c7; color: var(--ok); }

.pill {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.75rem;
  background: var(--accent-soft);
  color: var(--accent);
  margin: 0 4px 4px 0;
}
.pill.muted { background: #eef2f7; color: var(--muted); }
.pill.warn { background: #fff3dd; color: var(--warn); }

table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.message { margin-top: 10px; color: var(--muted); min-height: 1.2em; }
.message.error { color: var(--danger); }
.message.success { color: var(--ok); }

.auth-only, .app-only { display: none; }
.hidden { display: none !important; }
body.is-signed-in .auth-only { display: none !important; }
body.is-signed-in .app-only { display: block; }
body:not(.is-signed-in) .auth-gate { display: block; }
body.is-signed-in .auth-gate { display: none; }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.topbar .user { color: var(--muted); font-size: 0.9rem; }

.field-lock {
  font-size: 0.85rem;
  opacity: 0.75;
}

.muted { color: var(--muted); }

.toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: end;
  margin: 16px 0;
}

.code-reveal {
  font-family: ui-monospace, monospace;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  padding: 12px 16px;
  background: #0f1b2d;
  color: #e8f0ff;
  border-radius: 10px;
  word-break: break-all;
}

.placeholder-block {
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 20px;
  background: #fbfdff;
  color: var(--muted);
}

.kpi-value { font-size: 1.55rem; }
.kpi-sub { color: var(--muted); font-size: 0.78rem; margin-top: 2px; }

.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 160px;
  padding: 8px 4px 0;
  border-bottom: 1px solid var(--border);
}
.chart-bars .bar-col {
  flex: 1;
  min-width: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
}
.chart-bars .bar-col .bar {
  width: 100%;
  max-width: 22px;
  background: var(--accent);
  border-radius: 3px 3px 0 0;
  transition: height 0.2s ease;
}
.chart-bars .bar-col .bar.secondary { background: #9fc2ff; }
.chart-legend { display: flex; gap: 14px; margin-top: 8px; font-size: 0.8rem; color: var(--muted); }
.chart-legend .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; }
.chart-legend .dot.primary { background: var(--accent); }
.chart-legend .dot.secondary { background: #9fc2ff; }
.chart-empty { color: var(--muted); padding: 24px 0; text-align: center; }

.hbar-row { display: grid; grid-template-columns: 140px 1fr 70px; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 0.85rem; }
.hbar-track { background: #eef2f7; border-radius: 6px; height: 10px; overflow: hidden; }
.hbar-fill { background: var(--accent); height: 100%; border-radius: 6px; }
.hbar-value { text-align: right; color: var(--muted); }

.view-toggle { display: flex; gap: 6px; flex-wrap: wrap; }
.view-toggle button { width: auto; padding: 6px 12px; font-size: 0.82rem; }
.view-toggle button.secondary { background: #fff; color: var(--text); border-color: var(--border); }

.login-wrap {
  max-width: 420px;
  margin: 10vh auto;
  padding: 0 16px;
}

.empty-state {
  text-align: center;
  padding: 28px 16px;
  color: var(--muted);
}
.empty-state-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}
.empty-state-detail {
  margin: 8px 0 0;
  font-size: 0.9rem;
}
tr.empty-state-row td {
  border-bottom: none;
  padding: 8px 0;
}

@media (max-width: 860px) {
  .portal-shell { grid-template-columns: 1fr; }
  .portal-sidebar {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
  .brand { width: 100%; padding-bottom: 8px; }
}

/* ── Campaigns Operations V2 ─────────────────────────────────────── */
.portal-main--wide { max-width: 1280px; }
.ops-page-header { margin-bottom: 8px; }
.ops-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 16px 0 20px;
}
.ops-summary-card {
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  cursor: pointer;
}
.ops-summary-card:hover { border-color: var(--accent); }
.ops-summary-card.tone-warn { background: #fff9eb; border-color: #f0d48a; }
.ops-summary-card.tone-danger { background: #fff5f4; border-color: #f3b4ae; }
.ops-summary-card.tone-ok { background: #f2fbf5; border-color: #b7e0c4; }
.ops-summary-card.tone-info { background: #f4f8ff; border-color: #c5d7f5; }
.ops-summary-value { font-size: 1.75rem; font-weight: 700; }
.ops-summary-title { font-weight: 650; margin-top: 4px; }
.ops-summary-detail { color: var(--muted); font-size: 0.85rem; margin-top: 4px; line-height: 1.35; }

.ops-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.ops-tab {
  width: auto;
  background: #fff;
  color: var(--text);
  border-color: var(--border);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 600;
}
.ops-tab.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.ops-campaign-list { display: flex; flex-direction: column; gap: 12px; }
.ops-campaign-card {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 18px;
}
.ops-campaign-top {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.ops-campaign-top h2 { margin: 0; font-size: 1.15rem; }
.ops-campaign-meta { margin: 6px 0; color: var(--muted); }
.ops-campaign-reason { margin: 0; font-weight: 600; }
.ops-campaign-name { margin: 6px 0 0; font-size: 0.85rem; }
.ops-campaign-actions { flex-shrink: 0; }
.ops-primary-btn {
  display: inline-block;
  width: auto;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff !important;
  font-weight: 600;
  text-decoration: none !important;
  border: 1px solid var(--accent);
}
.ops-primary-btn.secondary,
a.ops-primary-btn.secondary {
  background: #fff;
  color: var(--text) !important;
  border-color: var(--border);
}
.ops-empty {
  text-align: center;
  padding: 48px 20px;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 16px;
}
.ops-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  background: #eef2f7;
  color: var(--text);
}
.ops-badge.tone-warn { background: #fff3d6; color: var(--warn); }
.ops-badge.tone-danger { background: #fde8e6; color: var(--danger); }
.ops-badge.tone-ok { background: #e5f6eb; color: var(--ok); }
.ops-badge.tone-info { background: #e8f0ff; color: var(--accent); }
.ops-badge.tone-neutral { background: #eef2f7; color: var(--muted); }

.ops-workspace-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  align-items: flex-start;
  margin-bottom: 16px;
}
.ops-workspace-header h1 { margin: 6px 0; font-size: 1.75rem; }
.ops-back { font-weight: 600; }
.ops-workspace-sub { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ops-workspace-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ops-workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.9fr);
  gap: 16px;
  align-items: start;
}
.ops-stage { margin-bottom: 18px; }
.ops-stage-question {
  margin: 0 0 6px;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.4;
}
.ops-stage-summary {
  margin: 0 0 10px;
  font-weight: 650;
  font-size: 0.92rem;
}
.ops-stage-summary.ok { color: var(--ok); }
.ops-customer-row { display: flex; gap: 14px; align-items: flex-start; }
.ops-customer-logo {
  width: 56px; height: 56px; border-radius: 12px; object-fit: cover; border: 1px solid var(--border);
}
.ops-customer-name { font-size: 1.1rem; font-weight: 700; }
.ops-check-list { list-style: none; padding: 0; margin: 0; }
.ops-check-list li {
  display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid #eef2f7;
}
.ops-check-list li.ok .ops-check-icon { color: var(--ok); }
.ops-check-list li.bad .ops-check-icon { color: var(--danger); }
.ops-check-icon { font-weight: 700; min-width: 1rem; }
.ops-actor {
  display: inline-block; margin-top: 4px; font-size: 0.75rem; font-weight: 700;
  color: var(--warn);
}
.ops-history-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 8px;
}
.ops-issue-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
.ops-issue-grid label { font-weight: 500; display: flex; gap: 8px; align-items: center; }
.ops-issue-grid input { width: auto; }
.ops-more-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.ops-more-group h3 { margin: 0 0 8px; font-size: 0.95rem; }

.ad-preview-wrap { margin-top: 8px; }
.ad-preview__placement {
  font-size: 0.8rem; font-weight: 700; color: var(--muted); margin-bottom: 8px;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.ad-preview {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(160deg, #0f1b2d 0%, #1a2f4d 100%);
  color: #fff;
  padding: 14px;
  max-width: 420px;
}
.ad-preview--featured, .ad-preview--community {
  display: flex; gap: 12px; align-items: center;
}
.ad-preview__logo {
  width: 48px; height: 48px; border-radius: 12px; overflow: hidden;
  background: rgba(255,255,255,0.12); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.ad-preview__logo img { width: 100%; height: 100%; object-fit: cover; }
.ad-preview__headline { font-weight: 700; font-size: 1rem; }
.ad-preview__desc { font-size: 0.85rem; opacity: 0.85; margin-top: 4px; line-height: 1.35; }
.ad-preview__cta {
  display: inline-block; margin-top: 8px; padding: 6px 10px;
  border-radius: 8px; background: #fff; color: #0f1b2d; font-size: 0.8rem; font-weight: 700;
}
.ad-preview--premium .ad-preview__hero {
  border-radius: 12px; overflow: hidden; aspect-ratio: 16/9; background: rgba(255,255,255,0.08);
  margin-bottom: 12px;
}
.ad-preview--premium .ad-preview__hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ad-preview--premium .ad-preview__hero--empty {
  display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.55);
}
.ad-preview--premium .ad-preview__body { display: flex; gap: 12px; align-items: flex-start; }
.ad-preview__dest { max-width: 420px; word-break: break-all; }
.banner.ok {
  border: 1px solid #b7e0c4;
  background: #f2fbf5;
  color: var(--ok);
  border-radius: 10px;
  padding: 10px 12px;
}

@media (max-width: 980px) {
  .ops-workspace-grid { grid-template-columns: 1fr; }
  .ops-campaign-card { flex-direction: column; align-items: stretch; }
}

/* ── Calendar V2 ─────────────────────────────────────────────────── */
.cal-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: end;
  justify-content: space-between;
  margin: 12px 0 16px;
}
.cal-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.cal-month-heading {
  margin: 0;
  min-width: 10rem;
  text-align: center;
  font-size: 1.25rem;
}
.cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 14px;
  font-size: 0.9rem;
  color: var(--muted);
}
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-swatch {
  width: 12px; height: 12px; border-radius: 4px; display: inline-block;
  border: 1px solid var(--border);
}
.cal-swatch.tone-available { background: #c8f0d4; border-color: #7dcb96; }
.cal-swatch.tone-shared { background: #ffe7a8; border-color: #e0b84a; }
.cal-swatch.tone-exclusive { background: #f8c9c4; border-color: #d97b72; }
.cal-swatch.tone-unavailable { background: #e5e7eb; border-color: #9ca3af; }

.cal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.9fr);
  gap: 16px;
  align-items: start;
}
.cal-weekdays, .cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}
.cal-weekday {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 0 8px;
}
.cal-cell {
  min-height: 78px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  padding: 8px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  color: var(--text);
  width: 100%;
}
.cal-cell--pad {
  border: none;
  background: transparent;
  min-height: 78px;
  pointer-events: none;
}
.cal-cell.tone-available { background: #f2fbf5; border-color: #b7e0c4; }
.cal-cell.tone-shared { background: #fff9eb; border-color: #f0d48a; }
.cal-cell.tone-exclusive { background: #fff5f4; border-color: #f3b4ae; }
.cal-cell.tone-unavailable { background: #f3f4f6; border-color: #d1d5db; color: #6b7280; }
.cal-cell.is-today { box-shadow: inset 0 0 0 2px var(--accent); }
.cal-cell.is-selected {
  outline: 3px solid var(--accent);
  outline-offset: 1px;
}
.cal-cell:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.cal-cell-day { font-weight: 700; font-size: 0.95rem; }
.cal-cell-status { font-size: 0.72rem; font-weight: 650; line-height: 1.25; }
.cal-cell-sub { font-size: 0.68rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.cal-detail-panel h2 { margin-top: 0; }
.cal-placement-block {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  margin: 12px 0;
  background: #fafcff;
}
.cal-placement-block.tone-exclusive { background: #fff5f4; border-color: #f3b4ae; }
.cal-placement-block.tone-shared { background: #fff9eb; border-color: #f0d48a; }
.cal-placement-block.tone-available { background: #f2fbf5; border-color: #b7e0c4; }

/* ── Launch Wizard ──────────────────────────────────────────────── */
.launch-header { margin-bottom: 12px; }
.launch-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 16px;
}
.launch-step {
  width: auto;
  background: #eef2f7;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.9rem;
}
.launch-step.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.launch-step.done {
  background: #e5f6eb;
  color: var(--ok);
  border-color: #b7e0c4;
}
.launch-panel { min-height: 280px; }
.launch-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
  align-items: center;
}
.launch-summary { margin: 12px 0; }
.launch-preview-large {
  margin: 16px 0;
  padding: 16px;
  background: #f7f9fc;
  border: 1px solid var(--border);
  border-radius: 16px;
}
.launch-status {
  padding: 10px 12px;
  border-radius: 10px;
  background: #eef2f7;
}
.launch-status.ok { background: #e5f6eb; color: var(--ok); }
.launch-status.warn { background: #fff3d6; color: var(--warn); }
.launch-status.bad { background: #fde8e6; color: var(--danger); }
.launch-autofill, .launch-choice {
  margin: 18px 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fafcff;
}
.launch-autofill h3, .launch-choice h3 { margin: 0 0 8px; font-size: 1rem; }
.launch-radio, .launch-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 8px 0;
}
.launch-tech { margin-top: 20px; }
.ops-edit-grid { display: grid; gap: 14px; margin: 12px 0 18px; }
.ops-edit-row {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fafcff;
}
.ops-edit-label {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.ops-edit-value { font-size: 1.05rem; line-height: 1.4; word-break: break-word; }
.ops-edit-form input,
.ops-edit-form textarea,
.ops-edit-form select {
  width: 100%;
  margin: 6px 0;
}
.ops-edit-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ops-edit-btn, .ops-replace-btn {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
}
.ops-asset-card {
  margin: 12px 0;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}
.ops-asset-body {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  align-items: start;
  margin-top: 8px;
}
.ops-asset-preview {
  width: 96px;
  height: 96px;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #f3f5f8;
}
.ops-asset-preview--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  font-size: 0.8rem;
}
.launch-status.suggest { background: #fff8e8; color: #8a6d1d; margin-top: 8px; }
.ops-primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 10px;
  text-decoration: none;
}
.cal-placement-head {
  display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap;
}
.cal-placement-head h3 { margin: 0; font-size: 0.95rem; }
.cal-occupant {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(0,0,0,0.06);
}
.cal-exclusive-note {
  margin: 8px 0;
  font-size: 0.9rem;
  line-height: 1.4;
}

/* Schedule & Price — first-class campaign workspace card */
.ops-commercial-host {
  padding: 0;
  border: none;
  background: transparent;
}
.ops-commercial-card {
  background: var(--surface);
  border: 2px solid var(--accent);
  border-radius: 16px;
  padding: 18px 20px 14px;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
  margin-bottom: 14px;
}
.ops-commercial-card > h2 {
  margin: 0 0 14px;
  font-size: 1.2rem;
}
.ops-payment-card {
  border-color: #0f766e;
}
.ops-payment-card > h2 {
  color: #0f766e;
}
.ops-payment-select {
  display: block;
  width: 100%;
  max-width: 320px;
  margin: 6px 0 8px;
  padding: 10px 12px;
  font-size: 1rem;
  font-weight: 600;
}
.ops-payment-facts {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.ops-payment-facts > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ops-payment-blocker {
  margin: 8px 0;
  font-size: 1.05rem;
}
.ops-controls-card {
  background: var(--surface);
  border: 2px solid #b45309;
  border-radius: 16px;
  padding: 18px 20px 16px;
  margin-bottom: 14px;
}
.ops-controls-card > h2 {
  margin: 0 0 8px;
  font-size: 1.2rem;
}
.ops-control-danger {
  width: auto;
  margin-top: 8px;
  background: #b91c1c;
  border-color: #b91c1c;
  color: #fff;
  font-weight: 700;
}
.ops-control-danger:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.ops-control-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
  font-weight: 600;
}
.ops-control-warn {
  margin: 8px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff7ed;
  border: 1px solid #fdba74;
  color: #9a3412;
  font-size: 0.92rem;
}
.ops-commercial-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.ops-commercial-heading strong {
  font-size: 0.95rem;
}
.ops-commercial-edit {
  width: auto;
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 650;
  font-size: 0.9rem;
}
.ops-commercial-value {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
}
.ops-commercial-to {
  margin: 2px 0 4px;
  font-size: 0.85rem;
}
.ops-commercial-meta {
  margin-top: 4px;
  font-size: 0.88rem;
  line-height: 1.4;
}
.ops-commercial-changed {
  margin-top: 8px;
  font-size: 0.88rem;
}
.ops-commercial-price {
  font-size: 1.35rem;
}
.ops-commercial-rule {
  border: none;
  border-top: 1px solid var(--border);
  margin: 16px 0;
}
.ops-commercial-payment {
  margin: 14px 0 0;
  font-size: 0.82rem;
}
.ops-commercial-disabled {
  margin: 0;
  max-width: 16rem;
  font-size: 0.82rem;
  line-height: 1.35;
  text-align: right;
}
.ops-commercial-form {
  margin: 12px 0 4px;
  grid-template-columns: 1fr 1fr;
}
.ops-commercial-span {
  grid-column: 1 / -1;
}
.ops-commercial-availability {
  grid-column: 1 / -1;
  margin: 4px 0 8px;
  min-height: 1.4em;
}
.ops-commercial-availability .launch-status {
  margin: 0;
}

@media (max-width: 980px) {
  .cal-layout { grid-template-columns: 1fr; }
  .cal-cell { min-height: 64px; padding: 6px; }
  .ops-commercial-heading {
    align-items: flex-start;
  }
  .ops-commercial-disabled {
    text-align: left;
    max-width: none;
  }
}
