/* Create page: Auto Generate + Manual Setup (one shared form) with the live YOUR LANDING PAGES cards on the right. */
.gen-panel.gen-wide { max-width: 1240px; }
.gen-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: 22px; align-items: start; }
.gen-main { min-width: 0; }
.gen-side { position: sticky; top: 76px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 18px; background: rgba(255, 255, 255, .03); padding: 14px 14px 16px; max-height: calc(100vh - 96px); overflow: auto; }
.side-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 10px; }
.side-title { margin: 0; font-size: 12.5px; letter-spacing: .12em; font-weight: 750; color: #c4b5fd; }
.side-count { font-size: 12px; color: var(--muted); }
.side-foot { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; align-items: flex-start; }
.side-foot .button { align-self: stretch; text-align: center; justify-content: center; }
.is-locked .gen-main { opacity: .72; }

/* Meta Titles */
.title-rows { display: grid; gap: 8px; }
.title-row { position: relative; }
.title-lbl { display: block; font-size: 12px; color: var(--muted); margin: 0 0 3px 12px; }
.ai-bar { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }

/* Domain Configuration rows */
.drows { display: grid; gap: 10px; }
.drow { display: grid; grid-template-columns: 26px minmax(0, 1fr) minmax(0, 1fr); gap: 8px 12px; align-items: end; padding: 12px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 16px; background: rgba(255, 255, 255, .025); }
.drow.has-error { border-color: rgba(248, 113, 113, .65); }
.dr-n { grid-row: 1 / span 3; align-self: start; margin-top: 4px; width: 24px; height: 24px; border-radius: 50%; background: var(--primary-soft); color: #ddd6fe; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.dr-lbl { display: block; font-size: 11.5px; color: var(--muted); margin: 0 0 3px 4px; text-transform: uppercase; letter-spacing: .04em; }
.dr-dom { grid-column: 2 / -1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; align-self: center; }
.dr-dom .dr-lbl { font-weight: 400; }
.dr-tpl { grid-column: 2 / -1; }
.dr-col { grid-column: 2; }
.dr-bg { grid-column: 3; }
.dr-tplbox, .dr-colbox { display: flex; align-items: center; gap: 8px; }
.dr-thumb { width: 54px; height: 38px; object-fit: cover; object-position: top; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .18); flex: none; background: #12121a; }
.drow .g-input.g-select { padding: 9px 14px; font-size: 13.5px; min-width: 0; }
.drow .g-input { padding: 9px 14px; font-size: 13.5px; }
.dr-prev { white-space: nowrap; font-size: 12px; margin: 0; }
.pl-dot { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .35); flex: none; display: inline-block; }
.pl-sq { border-radius: 4px; }
.dr-picker { width: 34px; height: 30px; padding: 0; border: 1px solid rgba(255, 255, 255, .28); border-radius: 8px; background: transparent; cursor: pointer; flex: none; }
.dr-adv { grid-column: 2 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding-top: 4px; border-top: 1px dashed rgba(255, 255, 255, .12); }
.dr-advf { min-width: 0; }

/* Manual assets */
.asset-domains { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.ad-chip { position: relative; padding: 7px 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .22); background: transparent; color: var(--text-soft); font: inherit; font-size: 13px; cursor: pointer; }
.ad-chip.is-on { background: var(--primary-soft); border-color: var(--primary-hover); color: #fff; }
.ad-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #34d399; margin-left: 7px; vertical-align: middle; }
.asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.asset-tile { border: 1px solid rgba(255, 255, 255, .14); border-radius: 14px; padding: 11px 12px; background: rgba(255, 255, 255, .025); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.asset-tile.is-busy { opacity: .6; }
.asset-tile.has-error { border-color: rgba(248, 113, 113, .65); }
.at-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 8px; }
.at-head strong { font-size: 13.5px; }
/* Auto | Upload | URL: all three words must always be readable (a narrow tile drops the switch under its title instead of clipping the last word) */
.at-seg { display: inline-flex; flex: 1 1 100%; max-width: 100%; border: 1px solid rgba(255, 255, 255, .22); border-radius: 999px; overflow: hidden; }
.at-seg button { flex: 1 1 0; min-width: 0; border: 0; background: transparent; color: var(--text-soft); font: inherit; font-size: 12px; padding: 5px 8px; cursor: pointer; white-space: nowrap; }
.at-seg button.is-on { background: var(--gradient); color: #fff; }
.at-seg button:disabled { opacity: .4; cursor: not-allowed; }
.at-file { display: flex; align-items: center; gap: 10px; min-width: 0; }
.at-thumb { width: 54px; height: 40px; object-fit: contain; border-radius: 8px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14); flex: none; }
.at-name { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.at-btns { display: flex; gap: 12px; }
.at-btns .link-btn, .at-all { font-size: 12px; margin: 0; }
.at-empty { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.at-urlprev { display: flex; align-items: center; gap: 10px; }
.at-urlprev[hidden], .at-err[hidden] { display: none; }
.asset-tile .g-input { padding: 9px 14px; font-size: 13px; }

/* YOUR LANDING PAGES cards */
.pcards { display: grid; gap: 10px; }
.pcard { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; padding: 10px; border: 1px solid rgba(255, 255, 255, .13); border-radius: 16px; background: rgba(10, 10, 16, .7); }
.pc-thumb { position: relative; width: 112px; height: 84px; border-radius: 10px; overflow: hidden; background: #12121a; border: 1px solid rgba(255, 255, 255, .14); }
.pc-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.pc-frame { width: 448px; height: 336px; border: 0; transform: scale(.25); transform-origin: 0 0; pointer-events: none; background: #fff; }
.pc-body { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.pc-dom { font-weight: 700; font-size: 13.5px; overflow-wrap: anywhere; }
.pc-title { font-size: 12.5px; color: var(--text-soft); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 2px; }
.pc-tpl { font-size: 11.5px; padding: 2px 8px; border-radius: 999px; background: var(--primary-soft); color: #ddd6fe; }
.pc-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; padding: 2px 8px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .16); color: var(--text-soft); }
.pc-state { font-size: 12px; margin-top: 2px; color: #c4b5fd; }
.pc-success { color: #34d399; }
.pc-failed { color: #f87171; }
.pc-actions { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }

@media (max-width: 1040px) {
  .gen-grid { grid-template-columns: 1fr; }
  .gen-side { position: static; max-height: none; }
}
@media (max-width: 640px) {
  .drow { grid-template-columns: 26px minmax(0, 1fr); }
  .dr-col, .dr-bg { grid-column: 2 / -1; }
  .dr-adv { grid-template-columns: 1fr; }
  .pcard { grid-template-columns: 92px minmax(0, 1fr); }
  .pc-thumb { width: 92px; height: 70px; }
  .pc-frame { transform: scale(.205); }
}

/* the generator panel is always dark, also inside the light dashboard theme */
.theme-light .gen-panel .gen-side, .theme-light .gen-panel .drow, .theme-light .gen-panel .asset-tile { background: rgba(255, 255, 255, .03); border-color: rgba(255, 255, 255, .14); color: var(--text-soft); }
.theme-light .gen-panel .pcard { background: rgba(10, 10, 16, .7); border-color: rgba(255, 255, 255, .13); }
.theme-light .gen-panel .pc-title, .theme-light .gen-panel .pc-dom, .theme-light .gen-panel .dr-dom, .theme-light .gen-panel .at-head strong { color: #f3f4f8; }


/* ---------- Landing Page cards (full width, one card per Landing Page) ---------- */
.gen-panel.gen-wide { max-width: 980px; }
.lp-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.lp-top .g-label { margin: 0; }
.lp-qty { width: auto; min-width: 190px; }
.lp-cards { display: grid; gap: 14px; }
.lp-card { border: 1px solid rgba(255, 255, 255, .16); border-radius: 18px; background: rgba(255, 255, 255, .03); padding: 14px 16px 16px; display: grid; gap: 10px; }
.lp-card.has-error { border-color: rgba(248, 113, 113, .65); }
.lp-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lp-name { margin: 0; font-size: 16px; font-weight: 700; }
.lp-prev { white-space: nowrap; }
.lp-lbl { display: block; font-size: 12px; color: var(--muted); margin: 0 0 4px 6px; }
.lp-sel { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.lp-sel .g-input { padding: 10px 14px; font-size: 14px; min-width: 0; }
.lp-colbox { display: flex; align-items: center; gap: 8px; }
.lp-card .g-input { padding: 10px 16px; font-size: 14.5px; }
.lp-result { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 8px; border-top: 1px dashed rgba(255, 255, 255, .14); }
.lp-result .pc-state { margin: 0; flex: 1; min-width: 120px; }
.lp-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 14px; }
.pl-dot { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .35); flex: none; display: inline-block; }
.pc-state { font-size: 12.5px; color: #c4b5fd; }
.pc-success { color: #34d399; }
.pc-failed { color: #f87171; }

/* logo for all LPs */
.logo-panel { margin-top: 10px; }
.logo-globe { display: inline-flex; vertical-align: middle; margin-right: 4px; color: #c4b5fd; }
.logo-up .at-file { margin-bottom: 6px; }
.logo-prev { max-height: 44px; max-width: 160px; object-fit: contain; border-radius: 8px; background: rgba(255, 255, 255, .06); padding: 4px; }
.url-preview { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.url-preview[hidden] { display: none; }

/* SEO targeting */
.seo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }

/* Manual: custom assets + advanced */
.asset-pick { max-width: 420px; margin-bottom: 12px; }
.adv-box > summary { cursor: pointer; list-style: none; margin: 0; }
.adv-box > summary::-webkit-details-marker { display: none; }
.adv-box > summary::after { content: '▾'; float: right; color: var(--muted); }
.adv-box[open] > summary::after { content: '▴'; }
.adv-body { margin-top: 12px; }
.adv-more > summary { cursor: pointer; color: #c4b5fd; margin: 6px 0; }
.asset-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.at-auto { margin: 0; }

/* summary */
.sum-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 8px; }
.sum-grid > div { display: flex; flex-direction: column; gap: 2px; }
.sum-k { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.sum-grid strong { font-size: 17px; }
.job-foot { display: flex; flex-direction: column; gap: 8px; align-items: stretch; margin-top: 12px; }
.job-foot .button { justify-content: center; text-align: center; }
.job-foot .link-btn { align-self: center; }

/* the preview popup: almost the whole screen, the page inside fills it and scrolls */
#designModal.modal-backdrop { padding: 12px; }
#designModal .modal.modal-lg { width: min(1600px, 98vw); max-width: none; height: calc(100vh - 24px); max-height: none; padding: 14px 18px 12px; display: flex; flex-direction: column; }
#designModal .mp-bar { margin: 8px 0; }
#designModal .mp-frame-wrap { position: relative; flex: 1 1 auto; min-height: 0; height: auto; border-radius: 10px; overflow: hidden; }
#designModal .mp-frame { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; background: #fff; border-radius: 0; }
#designModal .mp-frame-wrap.is-mobile .mp-frame { left: 50%; width: 390px; max-width: 100%; transform: translateX(-50%); box-shadow: 0 0 0 1px rgba(0,0,0,.12), 0 10px 40px rgba(0,0,0,.25); }
#designModal #previewNote { margin: 8px 0 0; }

@media (max-width: 720px) {
  .lp-sel, .seo-grid { grid-template-columns: 1fr; }
  .sum-grid { grid-template-columns: 1fr 1fr 1fr; }
}

.lp-field.has-error .g-input, .lp-sel > div.has-error .g-input { border-color: #f87171; }
.lp-field.has-error, .lp-sel > div.has-error { position: relative; }
