/* Campaign Marketing Builder — Lifestyle brand */
@font-face {
  font-family: "Manrope";
  src: url("../assets/fonts/Manrope-Regular.ttf") format("truetype");
  font-weight: 400;
}
@font-face {
  font-family: "Manrope";
  src: url("../assets/fonts/Manrope-SemiBold.ttf") format("truetype");
  font-weight: 600;
}
@font-face {
  font-family: "Manrope";
  src: url("../assets/fonts/Manrope-Bold.ttf") format("truetype");
  font-weight: 700;
}
@font-face {
  font-family: "Manrope";
  src: url("../assets/fonts/Manrope-ExtraBold.ttf") format("truetype");
  font-weight: 800;
}

:root {
  --navy: #03223b;
  --navy-soft: #24425c;
  --cream: #f1f1ef;
  --sand: #ebe6df;
  --white: #ffffff;
  --line: #ddd7ce;
  --accent: #03223b;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Manrope", system-ui, sans-serif;
  color: var(--navy);
  background: var(--cream);
}
.hidden { display: none !important; }

/* ---------- sign-in gate ---------- */
.gate {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: var(--sand);
}
.gate-card {
  background: var(--white);
  padding: 48px 56px;
  border-radius: 14px;
  max-width: 460px;
  text-align: center;
  box-shadow: 0 18px 60px rgba(3, 34, 59, 0.12);
}
.gate-logo { width: 180px; margin-bottom: 18px; }
.gate-card h1 { font-size: 22px; font-weight: 800; margin: 0 0 10px; }
.gate-card p { font-size: 14px; color: var(--navy-soft); margin: 0 0 24px; }

/* ---------- buttons ---------- */
.btn {
  font-family: inherit;
  font-size: 14px; font-weight: 700;
  border: 1.5px solid var(--navy);
  background: var(--white);
  color: var(--navy);
  padding: 10px 22px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn:hover { background: var(--sand); }
.btn.primary { background: var(--navy); color: var(--white); }
.btn.primary:hover { background: #0a3354; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.small { font-size: 12px; padding: 6px 14px; }
.btn:disabled { opacity: 0.5; cursor: default; }

/* ---------- top bar ---------- */
.app { height: 100vh; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 14px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  padding: 10px 22px;
}
.topbar-logo { height: 26px; }
.topbar-mark { height: 30px; width: 30px; border-radius: 7px; }
.topbar-title { font-weight: 800; font-size: 15px; }
.spacer { flex: 1; }
.user-name { font-size: 13px; color: var(--navy-soft); }

/* ---------- split layout ---------- */
.split {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(420px, 46%) 1fr;
  min-height: 0;
}
.panel { min-height: 0; overflow: auto; }

/* left: questions */
.questions { padding: 26px 30px 60px; }
.step {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 18px;
}
.step h2 {
  font-size: 15px; font-weight: 800;
  margin: 0 0 14px;
  display: flex; align-items: center; gap: 10px;
}
.step-no {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--navy); color: var(--white);
  font-size: 12px; font-weight: 800;
}
.field-row { display: flex; flex-direction: column; gap: 12px; }
.field-row.two-col { flex-direction: row; }
.field-row.two-col .inline-label { flex: 1; max-width: none; }
label { font-size: 13px; font-weight: 600; display: flex; flex-direction: column; gap: 6px; }
select, input[type="text"], input[type="number"], input[type="email"] {
  font-family: inherit; font-size: 14px;
  padding: 9px 12px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--navy);
}
select:focus, input:focus { outline: 2px solid rgba(3, 34, 59, 0.25); }

.inline-label { max-width: 240px; }

/* item checklists */
.item-list { display: flex; flex-direction: column; }
.item-row {
  display: flex; flex-direction: row; align-items: flex-start; gap: 10px;
  padding: 7px 6px;
  border-radius: 8px;
  font-size: 13px; font-weight: 400;
  cursor: pointer;
}
.item-row:hover { background: var(--cream); }
.item-row input { margin-top: 2px; accent-color: var(--navy); }
.item-name { flex: 1; line-height: 1.35; }
.item-price { font-weight: 700; white-space: nowrap; }
.item-price.free { color: #2c7a4b; }
.cat-count { font-size: 12px; color: var(--navy-soft); font-weight: 600; margin-left: auto; }

/* supplier groups */
details.supplier {
  border: 1px solid var(--line);
  border-radius: 10px;
  margin: 6px 0;
  background: var(--cream);
}
details.supplier > summary {
  list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px;
  font-size: 13px; font-weight: 700;
  cursor: pointer;
  user-select: none;
}
details.supplier > summary::before {
  content: "▸";
  margin-right: 8px;
  font-size: 11px;
  transition: transform 0.15s ease;
}
details.supplier[open] > summary::before { transform: rotate(90deg); }
details.supplier > summary::-webkit-details-marker { display: none; }
.sup-name { flex: 1; }
.sup-meta { font-size: 12px; font-weight: 600; color: var(--navy-soft); white-space: nowrap; }
details.supplier .item-row { margin: 0 8px; }
details.supplier .item-row:last-child { margin-bottom: 8px; }

/* exclusive "Pick one" set blocks */
.ex-set {
  border: 1px solid var(--line);
  border-left: 3px solid var(--navy);
  border-radius: 10px;
  margin: 8px 0;
  padding: 2px 4px 4px;
  background: rgba(3, 34, 59, 0.025);
}
.ex-set-head {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--navy-soft);
  padding: 7px 8px 3px;
}
details.supplier .ex-set { margin: 8px 8px; background: var(--white); }
.empty-cat { font-size: 13px; color: var(--navy-soft); padding: 4px 6px; }

/* output style pills */
.pill-group { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.pill {
  border: 1.5px solid var(--navy);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 13px; font-weight: 700;
  cursor: pointer;
  background: var(--white);
}
.pill.active { background: var(--navy); color: var(--white); }
.check-label { flex-direction: row; align-items: center; gap: 8px; font-weight: 600; }

/* required (mandatory) items */
.item-row.mandatory { opacity: 0.92; }
.item-row.mandatory input { accent-color: var(--navy-soft); cursor: not-allowed; }
.req-chip {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-size: 10px; font-weight: 700;
  vertical-align: 1px;
}

/* Agent Specific Marketing custom rows */
.step-hint { font-size: 12.5px; color: var(--navy-soft); margin: -4px 0 12px; }
.custom-row { display: flex; gap: 8px; margin-bottom: 8px; align-items: center; }
.custom-desc { flex: 1; }
.custom-price { width: 96px; }
.custom-del {
  border: 1.5px solid var(--line); background: var(--white);
  color: var(--navy-soft); border-radius: 8px;
  width: 34px; height: 34px; font-size: 18px; line-height: 1;
  cursor: pointer; flex: none;
}
.custom-del:hover { background: var(--sand); }

/* actions */
.actions { display: flex; flex-direction: column; gap: 12px; }
.email-row { display: flex; gap: 8px; }
.email-row input { flex: 1; }
.status { font-size: 13px; margin: 0; min-height: 18px; }
.status.ok { color: #2c7a4b; }
.status.err { color: #b3261e; }
.error { color: #b3261e; font-size: 13px; }

/* right: preview */
.preview {
  background: var(--sand);
  display: flex; flex-direction: column;
  border-left: 1px solid var(--line);
}
.preview-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px;
  font-size: 13px; font-weight: 800;
  color: var(--navy);
}
.preview-total { font-size: 14px; }
.preview-frame-wrap { position: relative; flex: 1; min-height: 0; }
#preview-frame {
  width: 100%; height: 100%;
  border: 0;
  background: transparent;
}
.preview-empty {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  padding: 40px;
  color: var(--navy-soft);
  font-size: 14px;
  background: var(--sand);
}
.preview-empty p { max-width: 320px; }

@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }
  .preview { border-left: 0; border-top: 1px solid var(--line); }
}
