/* Nurture app additions on top of the dashboard's styles.css */

.brand-text { font: 700 18px/1 var(--font-head); color: var(--brand-navy); padding: 9px 6px; display: inline-flex; align-items: center; gap: 8px; }
.brand-text i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.logo-plate img { max-width: 240px; object-fit: contain; }
#siteSel option { font-weight: 500; }

.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; }
.spacer { flex: 1; }
.stack-sm > * + * { margin-top: 8px; }
.mt { margin-top: 16px; }
.mb { margin-bottom: 16px; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.link { background: none; border: 0; padding: 0; color: var(--accent-ink); cursor: pointer; font: inherit; }
.link:hover { text-decoration: underline; }
.link.danger { color: var(--bad); }
label.inline { display: inline-flex; gap: 6px; align-items: center; font-weight: 500; color: var(--text); font-size: 13px; }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); padding: 0; }
input[type=color] { padding: 2px; width: 44px; height: 36px; cursor: pointer; }
textarea { width: 100%; min-height: 90px; resize: vertical; }
.form-grid input, .form-grid select, .form-grid textarea { width: 100%; }
.page-head { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 14px; }
.page-head .section-title { margin: 0; }
.crumb { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.crumb a { cursor: pointer; }
.kpi .value small { font-size: 14px; color: var(--muted); font-weight: 500; }

/* setup checklist */
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.checklist li { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 8px; background: var(--panel-2); }
.checklist li .tick { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; background: var(--warn-soft); color: var(--warn); }
.checklist li.done .tick { background: var(--good-soft); color: var(--good); }
.checklist li.done span { color: var(--muted); }

/* sequence steps timeline */
.timeline { display: grid; gap: 0; }
.step { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; }
.step::before { content: ''; position: absolute; left: 21px; top: 44px; bottom: -8px; width: 2px; background: var(--line); }
.step:last-child::before { display: none; }
.step .num { width: 44px; height: 44px; border-radius: 50%; background: var(--brand-navy); color: #fff; display: grid; place-items: center; font: 700 16px var(--font-head); z-index: 1; }
.step.off .num { background: var(--muted); }
.step .body { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 14px; box-shadow: var(--shadow); }
.step.off .body { opacity: .6; }
.step .when { font-size: 12px; font-weight: 600; color: var(--accent-ink); text-transform: uppercase; letter-spacing: .04em; }
.step .title { font: 600 16px var(--font-head); color: var(--heading); margin: 2px 0 6px; }
.step .stats { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; margin-top: 8px; }
.step .stats b { font-family: var(--font-head); font-size: 15px; color: var(--heading); }
.step .acts { display: flex; gap: 4px; flex-wrap: wrap; }
.waiting { background: var(--accent-soft); color: var(--accent-ink); border-radius: 999px; padding: 1px 8px; font-size: 12px; font-weight: 600; }
.delay-chip { display: inline-block; margin: 0 0 8px 56px; font-size: 12px; color: var(--muted); }

/* list cards */
.cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.tcard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.tcard .thumb { height: 190px; background: var(--panel-2); border-bottom: 1px solid var(--line); overflow: hidden; position: relative; cursor: pointer; }
.tcard .thumb iframe { width: 640px; height: 760px; border: 0; transform: scale(.47); transform-origin: 0 0; pointer-events: none; position: absolute; left: 50%; margin-left: -150px; }
.tcard .meta { padding: 12px 14px; display: grid; gap: 4px; flex: 1; }
.tcard .meta b { font: 600 15px var(--font-head); color: var(--heading); }
.tcard .foot { padding: 8px 14px 12px; display: flex; gap: 6px; flex-wrap: wrap; }

/* template editor */
.editor { display: grid; grid-template-columns: minmax(340px, 420px) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1000px) { .editor { grid-template-columns: 1fr; } }
.ed-top { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.ed-top input.name { font: 600 18px var(--font-head); min-width: 260px; flex: 1; }
.ed-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.ed-meta label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
@media (max-width: 640px) { .ed-meta { grid-template-columns: 1fr; } }
.ed-side { position: sticky; top: 120px; display: grid; gap: 12px; max-height: calc(100vh - 136px); overflow: auto; padding-right: 2px; }
.palette { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.palette button { font: 500 12px var(--font); padding: 8px 4px; border-radius: 8px; border: 1px dashed var(--line); background: var(--panel-2); color: var(--text); cursor: pointer; }
.palette button:hover { border-color: var(--accent); border-style: solid; color: var(--accent-ink); }
.blist { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.blist li { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; font-size: 13px; }
.blist li:hover { border-color: var(--accent); }
.blist li.sel { border-color: var(--accent); background: var(--accent-soft); }
.blist li.drag { opacity: .4; }
.blist li.over { box-shadow: 0 -3px 0 var(--cta); }
.blist .grip { cursor: grab; color: var(--muted); user-select: none; }
.blist .bname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.blist .bname small { margin-left: 6px; }
.blist .ib { background: none; border: 0; cursor: pointer; color: var(--muted); padding: 2px 4px; font-size: 13px; border-radius: 4px; }
.blist .ib:hover { color: var(--text); background: var(--panel-2); }
.blist .ib.del:hover { color: var(--bad); }
.bform { display: grid; gap: 10px; }
.bform label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.bform .two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bform .three { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.bform fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 10px; display: grid; gap: 8px; margin: 0; }
.bform legend { font-size: 12px; font-weight: 600; color: var(--heading); padding: 0 4px; }
.imgrow { display: flex; gap: 6px; }
.imgrow input { flex: 1; min-width: 0; }
.rte-bar { display: flex; gap: 2px; flex-wrap: wrap; padding: 4px; border: 1px solid var(--line); border-bottom: 0; border-radius: 8px 8px 0 0; background: var(--panel-2); }
.rte-bar button, .rte-bar select { font: 600 12px var(--font); padding: 4px 8px; border: 1px solid transparent; background: none; color: var(--text); border-radius: 6px; cursor: pointer; }
.rte-bar button:hover { border-color: var(--line); background: var(--panel); }
.rte-bar select { border-color: var(--line); background: var(--panel); }
.rte { min-height: 140px; max-height: 360px; overflow: auto; padding: 10px 12px; border: 1px solid var(--line); border-radius: 0 0 8px 8px; background: #fff; color: #1f2d45; font: 14px/1.55 Arial, sans-serif; outline: none; }
.rte:focus { border-color: var(--accent); }
.rte p { margin: 0 0 10px; }
.preview-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.preview-bar { display: flex; gap: 8px; align-items: center; justify-content: space-between; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--panel-2); flex-wrap: wrap; }
.preview-bar .inbox { font-size: 13px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-bar .inbox b { color: var(--heading); }
.preview-stage { background: #e9eef3; display: flex; justify-content: center; padding: 0; }
.preview-stage iframe { width: 100%; height: calc(100vh - 210px); min-height: 600px; border: 0; background: #fff; transition: width .2s; }
.preview-stage.mobile { padding: 20px 0; }
.preview-stage.mobile iframe { width: 390px; border-radius: 18px; box-shadow: 0 10px 30px rgba(0,0,0,.15); height: 760px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { font: 600 12px var(--font); padding: 6px 10px; border: 0; background: var(--panel); color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--brand-navy); color: #fff; }
.dirty-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cta); display: inline-block; margin-right: 6px; }

/* contacts */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 12px; }
.filters label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.tagpill { display: inline-block; padding: 0 7px; border-radius: 999px; font-size: 11px; line-height: 18px; background: var(--accent-soft); color: var(--accent-ink); margin: 1px 3px 1px 0; }
.bulkbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 8px 12px; border-radius: 8px; background: var(--brand-navy); color: #fff; margin-bottom: 10px; }
.bulkbar .btn { padding: 4px 10px; font-size: 12px; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 10px; font-size: 13px; }
td.chk, th.chk { width: 28px; }

/* misc */
.snippet { position: relative; }
.snippet .btn { position: absolute; top: 6px; right: 6px; }
.funnel { display: grid; gap: 8px; }
.funnel .fr { display: grid; grid-template-columns: 110px minmax(0, 1fr) 90px; gap: 10px; align-items: center; font-size: 13px; }
.funnel .fr .bar { height: 10px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); overflow: hidden; }
.funnel .fr .bar i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.funnel .fr .n { text-align: right; font-weight: 600; }
.site-logo-thumb { height: 26px; max-width: 120px; object-fit: contain; background: #fff; border-radius: 4px; padding: 2px; border: 1px solid var(--line); }
.logo-cands { display: flex; gap: 8px; flex-wrap: wrap; }
.logo-cands button { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 6px; cursor: pointer; }
.logo-cands button:hover { border-color: var(--accent); }
.logo-cands img { height: 40px; max-width: 180px; object-fit: contain; display: block; }
.modal-card.wide { width: min(1000px, 100%); }

/* fixes: pills inside stacked labels, cards not stretched to row height */
.form-grid label .pill, .bform label .pill { align-self: flex-start; }
.grid.g2, .grid.g3 { align-items: start; }

.form-grid > .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid > .full { grid-column: auto; } }
