/* Editor UI */
:root {
  --bg: #f6f4f8; --panel: #ffffff; --line: #e7e2ec; --text: #1d1022; --muted: #6f6475;
  --brand: #350642; --accent: #ec2979; --ok: #0ca30c; --err: #d03b3b; --r: 12px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: 'Rubik', system-ui, sans-serif; font-size: 15px; }
a { color: var(--accent); }
h1 { font-size: 26px; margin: 0 0 4px; font-weight: 800; }
h2 { font-size: 19px; margin: 0 0 12px; }
h3 { font-size: 15px; margin: 18px 0 8px; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: 12.5px; margin: 4px 0 0; line-height: 1.5; }
.center { text-align: center; }
.grow { flex: 1; }
.loading, .empty { padding: 60px 20px; text-align: center; color: var(--muted); }

input, textarea, select { font: inherit; color: inherit; background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; width: 100%; }
textarea { resize: vertical; line-height: 1.5; }
input:focus, textarea:focus, select:focus { outline: 2px solid color-mix(in srgb, var(--accent) 45%, transparent); border-color: var(--accent); }
select.sm { width: auto; padding: 5px 8px; font-size: 13px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: #fff; color: var(--text); border-radius: 999px; padding: 8px 16px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background 0.15s, border-color 0.15s; }
.btn:hover { border-color: var(--brand); }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: #4d0d5e; }
.btn.danger { background: var(--err); border-color: var(--err); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: #efe9f3; }
.btn.danger-t { color: var(--err); }
.btn.sm { padding: 5px 12px; font-size: 13px; }
.btn.wide { width: 100%; }
.btn.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn.left { margin-inline-end: auto; }
.icon-btn { border: 0; background: transparent; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 16px; display: inline-grid; place-items: center; color: inherit; }
.icon-btn:hover { background: #efe9f3; }
.icon-btn.sm { width: 26px; height: 26px; font-size: 13px; }
.icon-btn:disabled { opacity: 0.3; }
.pill { display: inline-block; background: #fff2b8; color: #6b5300; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 99px; }
.pill.warn { background: #ffe1e8; color: #a3123f; }
.pill.muted { background: #eee; color: #555; }

.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.field-label { font-size: 13px; font-weight: 600; color: #4a3f50; }
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; margin: 8px 0; }
.check input { width: auto; }
.inline { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.inline select, .inline input { width: auto; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.span-2 { grid-column: 1 / -1; }
.row-btns { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 6px 0; }
.copy-row { display: flex; gap: 8px; }
.inline-row { display: flex; gap: 6px; margin-bottom: 6px; }

/* switch */
.switch { position: relative; display: inline-block; width: 36px; height: 20px; flex: none; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch i { position: absolute; inset: 0; background: #d6cfdc; border-radius: 99px; transition: 0.2s; }
.switch i::after { content: ''; position: absolute; top: 2px; inset-inline-start: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: 0.2s; box-shadow: 0 1px 2px rgb(0 0 0 / 0.2); }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { inset-inline-start: 18px; }
.switch input:indeterminate + i { background: #f2a3c3; }
.switch input:focus-visible + i { outline: 2px solid var(--brand); }
.switch.sm { width: 30px; height: 17px; }
.switch.sm i::after { width: 13px; height: 13px; }
.switch.sm input:checked + i::after { inset-inline-start: 15px; }

/* top nav */
.topnav { display: flex; align-items: center; gap: 22px; background: var(--brand); color: #fff; padding: 0 22px; height: 58px; position: sticky; top: 0; z-index: 10; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; }
.brand img { height: 22px; }
.brand span { background: var(--yellow, #ffd000); color: var(--brand); font-size: 12px; padding: 2px 8px; border-radius: 99px; }
.navlinks { display: flex; gap: 4px; overflow-x: auto; flex: 1; }
.navlinks a { color: #e8d9ee; text-decoration: none; padding: 7px 12px; border-radius: 99px; font-size: 14px; white-space: nowrap; }
.navlinks a:hover { background: rgb(255 255 255 / 0.1); }
.navlinks a.on { background: #fff; color: var(--brand); font-weight: 600; }
.nav-user { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #d7c4e0; }
.nav-user .btn { color: #fff; }
.nav-user .btn:hover { background: rgb(255 255 255 / 0.12); }

.page { max-width: 1280px; margin: 0 auto; padding: 28px 22px 80px; }
.page-full { max-width: none; padding: 0; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 18px; }
.page-head p { margin: 0; }
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar input[type='search'] { max-width: 320px; }
.toolbar select { width: auto; }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; background: var(--brand); padding: 20px; }
.login-card { background: #fff; border-radius: 20px; padding: 34px 30px; width: min(400px, 100%); display: flex; flex-direction: column; gap: 4px; }
.login-card h1 { text-align: center; margin-bottom: 18px; font-size: 22px; }
.login-logo { width: 120px; margin: 0 auto 6px; display: block; background: var(--brand); border-radius: 16px; padding: 10px; }
.login-msg { color: var(--err); min-height: 1em; margin: 6px 0; font-size: 14px; text-align: center; }

/* presentations list */
.deck-list { display: flex; flex-direction: column; gap: 10px; }
.deck-row { display: grid; grid-template-columns: 64px 1fr 120px auto; gap: 16px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 16px; }
.deck-logo { width: 64px; height: 64px; border-radius: 12px; background: var(--brand); display: grid; place-items: center; overflow: hidden; text-decoration: none; color: var(--yellow, #ffd000); font-weight: 900; font-size: 20px; }
.deck-logo img { max-width: 80%; max-height: 80%; object-fit: contain; background: #fff; border-radius: 6px; padding: 4px; }
.deck-info { display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: inherit; min-width: 0; }
.deck-info b { font-size: 16px; }
.deck-info small { font-size: 13px; color: #4a3f50; }
.deck-info small.muted { color: var(--muted); font-size: 12px; }
.deck-stats { display: flex; flex-direction: column; align-items: center; text-align: center; }
.deck-stats b { font-size: 22px; color: var(--accent); line-height: 1; }
.deck-stats small { font-size: 12px; }
.deck-actions { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }

/* modal */
.modal-wrap { position: fixed; inset: 0; background: rgb(29 16 34 / 0.55); z-index: 100; display: grid; place-items: center; padding: 20px; animation: fade 0.15s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: #fff; border-radius: 18px; width: min(560px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; box-shadow: 0 20px 60px rgb(0 0 0 / 0.3); }
.modal.wide { width: min(1180px, 100%); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px 0; }
.modal-head h2 { margin: 0; }
.modal-body { padding: 16px 22px; overflow: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--line); }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px); opacity: 0; background: var(--brand); color: #fff; padding: 10px 18px; border-radius: 99px; z-index: 200; transition: 0.25s; font-weight: 500; box-shadow: 0 8px 24px rgb(0 0 0 / 0.25); }
.toast.in { transform: translate(-50%, 0); opacity: 1; }
.toast.err { background: var(--err); }

/* tags */
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 5px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.tag.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.tag-add { width: 110px; border-radius: 99px; padding: 4px 12px; font-size: 13px; }

/* wizard */
.logo-row { display: flex; align-items: center; gap: 12px; margin: 4px 0 8px; }
.logo-prev { width: 120px; height: 60px; border: 1px dashed var(--line); border-radius: 10px; display: grid; place-items: center; font-size: 12px; color: var(--muted); overflow: hidden; }
.logo-prev img { max-width: 90%; max-height: 90%; object-fit: contain; }
.case-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.case-opt { position: relative; border: 2px solid var(--line); background: #fff; border-radius: 12px; padding: 0 0 10px; cursor: pointer; text-align: start; font: inherit; display: flex; flex-direction: column; gap: 3px; overflow: hidden; }
.case-opt img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--brand); }
.case-opt-t { font-weight: 700; padding: 4px 10px 0; font-size: 14px; }
.case-opt small { padding: 0 10px; color: var(--muted); font-size: 12px; }
.case-opt .pill { margin: 2px 10px 0; align-self: flex-start; }
.case-opt.on { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.case-opt.used:not(.on) { opacity: 0.6; }
.check-badge { position: absolute; top: 8px; inset-inline-start: 8px; background: var(--accent); color: #fff; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; }

/* ====== deck editor ====== */
.ed-head { display: flex; align-items: center; gap: 12px; padding: 10px 18px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 58px; z-index: 9; }
.title-in { border: 0; font-size: 18px; font-weight: 700; max-width: 420px; background: transparent; }
.title-in:hover:not(:disabled) { background: var(--bg); }
.save-status { font-size: 12.5px; color: var(--ok); white-space: nowrap; }
.save-status.busy { color: var(--muted); }
.save-status.err { color: var(--err); font-weight: 700; }
.ed-head-actions { margin-inline-start: auto; display: flex; gap: 6px; align-items: center; }
.ed { display: grid; grid-template-columns: 290px minmax(0, 1fr) 360px; height: calc(100vh - 58px - 57px); }
.ed-side, .ed-props { overflow: auto; background: #fff; }
.ed-side { border-inline-end: 1px solid var(--line); display: flex; flex-direction: column; }
.ed-props { border-inline-start: 1px solid var(--line); padding: 18px; }
.side-top { padding: 12px 14px; display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px solid var(--line); }
.slide-list { flex: 1; padding: 6px 8px 10px; }
.sec { margin-top: 8px; }
.sec-head { display: flex; align-items: center; gap: 8px; padding: 7px 6px; font-size: 13px; position: sticky; top: 0; background: #fff; z-index: 1; cursor: pointer; border-radius: 8px; user-select: none; }
.sec-head:hover { background: var(--bg); }
.sec-head small { color: var(--muted); margin-inline-start: auto; font-variant-numeric: tabular-nums; }
.sec-head .chev { display: inline-block; width: 12px; color: var(--muted); font-size: 16px; line-height: 1; transition: transform 0.15s; }
.sec.open .sec-head .chev { transform: rotate(-90deg); }
.sec.off .sec-head b { color: var(--muted); }
.sec-peek { display: flex; gap: 4px; padding: 0 26px 6px 6px; cursor: pointer; align-items: center; }
.sec-peek .peek { width: 38px; aspect-ratio: 16 / 9; border-radius: 3px; overflow: hidden; pointer-events: none; box-shadow: 0 0 0 1px var(--line); flex: none; }
.sec-peek .peek.off { opacity: 0.35; }
.sec-peek .peek.sel { box-shadow: 0 0 0 2px var(--accent); }
.sec-peek .peek-more { font-size: 11px; color: var(--muted); }
.eye { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--brand); cursor: pointer; padding: 0; }
.eye:hover { background: #efe7f3; }
.eye.off { color: #b9adc4; }
.eye.mixed { color: #c98aa8; }
.eye:focus-visible { outline: 2px solid var(--accent); }
.link-btn { border: 0; background: none; color: var(--accent); font: inherit; font-size: 12px; cursor: pointer; padding: 0; margin-inline-start: auto; }
.side-top { gap: 8px; }
.si-num { width: 18px; text-align: center; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.slide-item { display: grid; grid-template-columns: 18px 76px 1fr auto; gap: 8px; align-items: center; padding: 5px 4px; border-radius: 10px; cursor: pointer; border: 2px solid transparent; }
.slide-item:hover { background: var(--bg); }
.slide-item.sel { border-color: var(--accent); background: #fff5f9; }
.slide-item.off .mini, .slide-item.off .slide-item-t { opacity: 0.4; }
.slide-item.dragging { opacity: 0.4; }
.slide-item.drop-over { box-shadow: 0 -3px 0 var(--accent); }
.slide-item-t { display: flex; flex-direction: column; min-width: 0; }
.slide-item-t span { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slide-item-t small { font-size: 11px; color: var(--muted); }
.mini { border-radius: 5px; overflow: hidden; pointer-events: none; box-shadow: 0 0 0 1px var(--line); }
.side-add { padding: 10px; display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line); position: sticky; bottom: 0; background: #fff; }

.ed-stage { padding: 14px 22px; overflow: auto; display: flex; flex-direction: column; gap: 10px; }
.stage-bar { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.preview { border-radius: 10px; overflow: hidden; box-shadow: 0 10px 34px rgb(53 6 66 / 0.18); max-width: calc((100vh - 220px) * 16 / 9); width: 100%; margin: 0 auto; }
.preview.is-off { opacity: 0.55; filter: grayscale(0.6); }
.preview .tile { cursor: default; }

.ed-props h2 { font-size: 17px; }
.items { display: flex; flex-direction: column; gap: 8px; }
.item { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px 0; background: #fcfbfd; }
.item-head { display: flex; align-items: center; gap: 2px; margin-bottom: 4px; }
.item-head b { margin-inline-end: auto; color: var(--accent); }
.img-field { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.img-field img { width: 110px; height: 70px; object-fit: contain; border-radius: 8px; background: var(--bg); }
.img-field img.on-dark { background: var(--brand); padding: 6px; }
.img-empty { width: 110px; height: 70px; border: 1px dashed var(--line); border-radius: 8px; display: grid; place-items: center; font-size: 12px; color: var(--muted); }
.pick-list { display: flex; flex-direction: column; gap: 2px; max-height: 46vh; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 6px; }
.pick { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 8px; cursor: pointer; font-size: 13.5px; }
.pick:hover { background: var(--bg); }
.pick input { width: auto; }
.pick img { width: 34px; height: 34px; object-fit: cover; border-radius: 50%; }
.pick-list.logos .pick img { object-fit: contain; border-radius: 6px; background: var(--brand); padding: 3px; width: 48px; }
.studio-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.studio-pick.big { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.studio-opt { border: 2px solid var(--line); border-radius: 10px; background: #fff; padding: 0 0 6px; cursor: pointer; font: inherit; overflow: hidden; display: flex; flex-direction: column; text-align: start; }
.studio-opt img, .studio-opt > span { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #222; color: #fff; display: grid; place-items: center; font-weight: 800; }
.studio-opt small { padding: 4px 8px 0; font-size: 12px; }
.studio-opt.on { border-color: var(--accent); }
.type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-top: 12px; }
.type-opt { border: 2px solid var(--line); background: #fff; border-radius: 12px; padding: 6px; cursor: pointer; font: inherit; font-weight: 600; display: flex; flex-direction: column; gap: 6px; }
.type-opt:hover { border-color: var(--accent); }
.swatches { display: flex; gap: 8px; align-items: center; }
.swatch { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.swatch.on { box-shadow: 0 0 0 3px var(--brand); }
.swatches input[type='color'] { width: 40px; height: 32px; padding: 2px; }

/* media plan builder */
.mp-edit { overflow-x: auto; }
.mp-edit table { border-collapse: collapse; width: 100%; font-size: 13px; }
.mp-edit th { font-weight: 600; color: var(--muted); padding: 4px; text-align: start; white-space: nowrap; }
.mp-edit td { padding: 3px; border-top: 1px solid var(--line); white-space: nowrap; }
.mp-edit td:first-child { display: flex; align-items: center; gap: 4px; }
.mp-edit input { padding: 5px 7px; min-width: 110px; font-size: 13px; }
.mp-edit .num-in { min-width: 0; width: 88px; direction: ltr; text-align: end; }
.mp-edit .kpi-in { min-width: 0; width: 70px; }
.mp-edit .mon-in { min-width: 0; width: 88px; font-weight: 600; }
.mp-edit .row-tot, .mp-edit .tot td { font-weight: 700; direction: ltr; text-align: end; }
.mp-edit .tot td:first-child { display: table-cell; text-align: start; direction: rtl; }
.mp-preview { border-radius: 10px; overflow: hidden; max-width: 900px; margin: 0 auto; }

/* library */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.lib-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 8px 8px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; position: relative; }
.lib-card:hover { border-color: var(--accent); }
.lib-card.off { opacity: 0.6; }
.lib-card b { padding: 4px 4px 0; }
.lib-card small { padding: 0 4px; color: var(--muted); font-size: 12.5px; }
.lib-card .pill { position: absolute; top: 14px; inset-inline-start: 14px; }
.lib-card .person-name { margin-top: 4px; }
.lib-thumb { border-radius: 8px; overflow: hidden; pointer-events: none; }
.case-edit { display: grid; grid-template-columns: 1fr 1.15fr; gap: 26px; }
.case-side h3:first-child { margin-top: 0; }
.case-preview { border-radius: 10px; overflow: hidden; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; margin-top: 8px; }
.media-item { position: relative; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; cursor: grab; }
.media-item img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: var(--brand); }
.media-item input { border: 0; border-top: 1px solid var(--line); border-radius: 0; font-size: 12px; padding: 5px 6px; }
.media-item .badge { position: absolute; top: 6px; inset-inline-start: 6px; background: var(--yellow, #ffd000); color: var(--brand); font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; }
.media-acts { position: absolute; top: 4px; inset-inline-end: 4px; display: flex; gap: 2px; }
.media-acts .icon-btn { background: rgb(255 255 255 / 0.9); }
.media-item.drop-over { outline: 3px solid var(--accent); }
.en-box { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin: 8px 0; }
.en-box summary { cursor: pointer; font-weight: 600; font-size: 13px; }
.en-box input, .en-box textarea { direction: ltr; }

.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.person { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 12px; display: flex; flex-direction: column; gap: 6px; align-items: center; cursor: grab; }
.person.off { opacity: 0.5; }
.person.drop-over { outline: 3px solid var(--accent); }
.person-img { width: 110px; height: 110px; border-radius: 50%; overflow: hidden; border: 0; padding: 0; cursor: pointer; background: var(--bg); display: grid; place-items: center; font-size: 28px; color: var(--muted); }
.person-img img { width: 100%; height: 100%; object-fit: cover; }
.people-grid.logos .person-img { width: 100%; height: 90px; border-radius: 10px; background: var(--brand); }
.people-grid.logos .person-img img { object-fit: contain; padding: 10px; }
.person-name { text-align: center; font-weight: 700; border-color: transparent; padding: 4px; }
.person-role { text-align: center; font-size: 13px; color: var(--muted); border-color: transparent; padding: 4px; }
.person-name:hover, .person-role:hover { border-color: var(--line); }
.person-acts { display: flex; gap: 8px; align-items: center; }

.studio-up .btn.primary { margin: 4px 0; }
.user-list { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.user-row { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 10px 16px; }
.add-user { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px 2px; }
.add-user .btn { margin-bottom: 12px; }

/* stats */
.stat-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.stat { background: var(--bg); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.stat b { font-size: 20px; color: var(--brand); }
.stat b.clip { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat span { font-size: 12.5px; color: var(--muted); }
.bars { display: flex; flex-direction: column; gap: 6px; }
.bar-row { display: grid; grid-template-columns: 260px 1fr 70px; gap: 10px; align-items: center; font-size: 13px; }
.bar-l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-t { height: 10px; background: #f0efec; border-radius: 99px; overflow: hidden; }
.bar-t i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.bar-v { color: var(--muted); font-variant-numeric: tabular-nums; }
.visits { margin: 0; padding-inline-start: 18px; font-size: 13.5px; line-height: 1.8; }

@media (max-width: 1100px) {
  .ed { grid-template-columns: 220px minmax(0, 1fr) 300px; }
  .slide-item { grid-template-columns: 18px 1fr auto; }
  .slide-item .mini { display: none; }
  .deck-row { grid-template-columns: 56px 1fr; }
  .deck-stats, .deck-actions { grid-column: 1 / -1; justify-content: flex-start; flex-direction: row; gap: 8px; }
  .case-edit { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .ed { grid-template-columns: 1fr; height: auto; }
  .ed-side { max-height: 40vh; }
  .grid-2, .add-user, .stat-tiles { grid-template-columns: 1fr; }
  .topnav { flex-wrap: wrap; height: auto; padding: 8px 12px; gap: 8px; }
  .nav-user span { display: none; }
  .ed-head { top: 0; flex-wrap: wrap; }
  .bar-row { grid-template-columns: 120px 1fr 60px; }
}

/* ===== in-place slide editor ===== */
.cv-host { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.cv-bar { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 6px 8px; position: sticky; top: 0; z-index: 5; }
.cv-btn { border: 1px solid transparent; background: transparent; border-radius: 8px; padding: 5px 9px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--text); white-space: nowrap; }
.cv-btn:hover:not(:disabled) { background: #efe9f3; }
.cv-btn.on { background: var(--brand); color: #fff; }
.cv-btn:disabled { opacity: 0.35; cursor: default; }
.cv-sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.cv-colors { display: inline-flex; gap: 3px; margin: 0 4px; }
.cv-sw { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #cbc3d1; cursor: pointer; padding: 0; }
.cv-wrap { position: relative; border-radius: 10px; overflow: hidden; box-shadow: 0 10px 34px rgb(53 6 66 / 0.18); width: 100%; max-width: calc((100vh - 250px) * 16 / 9); margin: 0 auto; user-select: none; touch-action: none; }
.cv-stage .el { cursor: move; }
.cv-stage .el:hover { outline: 1px dashed rgb(236 41 121 / 0.7); outline-offset: -1px; }
.cv-stage .el-text:hover { cursor: text; }
.cv-stage .cv-editing { outline: 2px solid #ec2979 !important; background: rgb(255 255 255 / 0.08); cursor: text; user-select: text; z-index: 10; }
.cv-stage .cv-editing:focus { outline: 2px solid #ec2979; }
.cv-sel { position: absolute; outline: 2px solid #ec2979; pointer-events: none; z-index: 20; box-shadow: 0 0 0 1px #fff; }
.cv-sel.is-line { outline-style: dashed; }
.cv-h { position: absolute; width: 12px; height: 12px; background: #fff; border: 2px solid #ec2979; border-radius: 3px; pointer-events: auto; }
.cv-h-se { right: -7px; bottom: -7px; cursor: nwse-resize; } .cv-h-nw { left: -7px; top: -7px; cursor: nwse-resize; }
.cv-h-sw { left: -7px; bottom: -7px; cursor: nesw-resize; } .cv-h-ne { right: -7px; top: -7px; cursor: nesw-resize; }
.cv-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 20px; align-items: start; }
.cv-layout .cv-wrap { max-width: calc((100vh - 300px) * 16 / 9); }
.cv-side { border-inline-start: 1px solid var(--line); padding-inline-start: 18px; }
.cv-video-prev { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 8px; background: #000; margin-top: 8px; }
.bg-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.bg-opt { aspect-ratio: 16 / 9; border-radius: 10px; border: 2px solid var(--line); background-size: cover; background-position: center; cursor: pointer; display: flex; align-items: flex-end; justify-content: center; padding: 6px; font: inherit; }
.bg-opt span { background: rgb(255 255 255 / 0.9); border-radius: 99px; padding: 2px 10px; font-size: 13px; font-weight: 600; }
.bg-opt.upload { background: var(--bg); align-items: center; }
.callout { background: #fff5f9; border: 1px solid #f6c5da; border-radius: 12px; padding: 12px 14px; margin: 10px 0; }
.callout p { margin: 6px 0; font-size: 13.5px; }
.callout ul { margin: 6px 0; padding-inline-start: 18px; font-size: 13.5px; }

/* ===== slide library ===== */
.filters select { max-width: 220px; }
.lib-groups { display: flex; flex-direction: column; gap: 26px; }
.lib-group-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.lib-group-head h2 { margin: 0; font-size: 18px; }
.lib-group-head h2 small { color: var(--muted); font-weight: 400; }
.tag.sm { padding: 2px 9px; font-size: 12px; cursor: default; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.lib-groups.picker .lib-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.lib-card.dim { opacity: 0.65; }
.lib-card.picked { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.lib-card .check-badge { top: 14px; }
.lib-card b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-tags { display: flex; gap: 4px; flex-wrap: wrap; padding: 0 4px; }
.lib-card .card-tags .pill { position: static; }
.case-opt-th { border-radius: 10px 10px 0 0; overflow: hidden; pointer-events: none; }
.type-opt small { color: var(--muted); font-weight: 400; font-size: 12.5px; }
.type-opt { text-align: start; padding: 14px; gap: 4px; }
@media (max-width: 1100px) { .cv-layout { grid-template-columns: 1fr; } .cv-side { border: 0; padding: 0; } }

/* ===================== v3: softer, roomier interface ===================== */
:root {
  --bg: #f6f2f9; --panel: #ffffff; --line: #ebe4f0; --text: #24112b; --muted: #7a6d82;
  --brand: #3b0a4a; --brand-2: #5b1a6e; --accent: #e8287a; --soft: #f3ecf7; --r: 16px;
  --shadow-sm: 0 1px 2px rgb(59 10 74 / 0.06), 0 2px 8px rgb(59 10 74 / 0.05);
  --shadow: 0 2px 6px rgb(59 10 74 / 0.06), 0 10px 30px rgb(59 10 74 / 0.08);
}
body { background: radial-gradient(1200px 600px at 100% -10%, #fbe9f3 0, transparent 60%), radial-gradient(900px 500px at -10% 0, #efe6fb 0, transparent 55%), var(--bg); background-attachment: fixed; }
.topnav { background: rgb(255 255 255 / 0.86); backdrop-filter: blur(14px); color: var(--text); border-bottom: 1px solid var(--line); height: 64px; box-shadow: var(--shadow-sm); }
.brand { color: var(--brand); }
.brand img { filter: brightness(0) saturate(100%) invert(9%) sepia(48%) saturate(4500%) hue-rotate(280deg); height: 24px; }
.brand span { background: linear-gradient(135deg, #ffd000, #ffb800); color: var(--brand); }
.navlinks a { color: var(--muted); font-weight: 500; padding: 8px 14px; }
.navlinks a:hover { background: var(--soft); color: var(--brand); }
.navlinks a.on { background: var(--brand); color: #fff; box-shadow: 0 4px 12px rgb(59 10 74 / 0.25); }
.nav-user { color: var(--muted); }
.nav-user .btn { color: var(--brand); }
.nav-user .btn:hover { background: var(--soft); }
.page { padding-top: 34px; }
.page-head h1 { font-size: 30px; letter-spacing: -0.02em; }
.page-head p { font-size: 15px; max-width: 640px; line-height: 1.55; }
.btn { border-color: var(--line); box-shadow: var(--shadow-sm); transition: transform 0.12s, box-shadow 0.15s, background 0.15s, border-color 0.15s; }
.btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: var(--shadow); border-color: #d9cce3; }
.btn.primary { background: linear-gradient(135deg, var(--brand-2), var(--brand)); border-color: transparent; }
.btn.primary:hover:not(:disabled) { background: linear-gradient(135deg, #6c2382, var(--brand-2)); }
.btn.ghost, .btn.ghost:hover:not(:disabled) { box-shadow: none; transform: none; }
input, textarea, select { border-radius: 12px; border-color: #e3d9ea; background: #fff; padding: 9px 12px; transition: border-color 0.15s, box-shadow 0.15s; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgb(232 40 122 / 0.12); }
.modal { border-radius: 24px; box-shadow: 0 30px 80px rgb(36 17 43 / 0.35); }
.modal-head { padding: 22px 26px 4px; }
.modal-head h2 { font-size: 21px; }
.modal-body { padding: 16px 26px 20px; }
.modal-foot { padding: 14px 26px; background: #fcfafd; border-radius: 0 0 24px 24px; position: sticky; bottom: 0; }
.modal-wrap { background: rgb(36 17 43 / 0.45); backdrop-filter: blur(3px); }
.toolbar { background: rgb(255 255 255 / 0.7); border: 1px solid var(--line); border-radius: 18px; padding: 10px 12px; box-shadow: var(--shadow-sm); }
.toolbar input[type='search'] { border-radius: 99px; padding-inline-start: 16px; min-width: 240px; }

/* deck list as cards with a cover preview */
.deck-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; }
.deck-card { background: #fff; border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; transition: transform 0.15s, box-shadow 0.15s; border: 1px solid var(--line); }
.deck-card:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgb(59 10 74 / 0.14); }
.deck-cover { display: block; position: relative; pointer-events: auto; }
.deck-cover .s { pointer-events: none; }
.deck-cover .badges { position: absolute; top: 10px; inset-inline-start: 10px; display: flex; gap: 6px; }
.deck-card .deck-body { padding: 14px 16px 6px; display: flex; flex-direction: column; gap: 3px; }
.deck-card .deck-body b { font-size: 16.5px; color: var(--text); }
.deck-card .deck-body small { color: var(--muted); font-size: 13px; }
.deck-card .deck-views { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); padding: 2px 16px 0; }
.deck-card .deck-views b { color: var(--accent); font-size: 15px; }
.deck-card .deck-actions { padding: 10px 12px 14px; justify-content: flex-start; margin-top: auto; }
.new-card { border: 2px dashed #d9c8e4; background: rgb(255 255 255 / 0.5); border-radius: 20px; display: grid; place-items: center; min-height: 180px; cursor: pointer; font: inherit; color: var(--brand); font-weight: 700; font-size: 17px; transition: background 0.15s, border-color 0.15s; }
.new-card:hover { background: #fff; border-color: var(--accent); }
.new-card span { display: block; font-size: 40px; line-height: 1; margin-bottom: 6px; color: var(--accent); }

/* library */
.lib-group { background: rgb(255 255 255 / 0.55); border: 1px solid var(--line); border-radius: 22px; padding: 16px 18px 18px; }
.lib-card { border-radius: 16px; box-shadow: var(--shadow-sm); transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s; }
.lib-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.lib-thumb { border-radius: 11px; }
.pill { background: #fff2bd; }

/* multi-select dropdown */
.ms { position: relative; }
.ms-btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid #e3d9ea; background: #fff; border-radius: 12px; padding: 9px 12px; font: inherit; cursor: pointer; max-width: 260px; }
.ms.active .ms-btn { border-color: var(--accent); background: #fff4f9; color: var(--brand); font-weight: 600; }
.ms-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-caret { color: var(--muted); font-size: 11px; }
.ms-pop { position: absolute; top: calc(100% + 6px); inset-inline-start: 0; z-index: 60; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 8px; min-width: 240px; max-height: 340px; overflow: auto; }
.ms-opt { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.ms-opt:hover { background: var(--soft); }
.ms-opt input { width: auto; }

/* deck editor */
.ed-head { top: calc(64px * var(--nz, 1)); background: rgb(255 255 255 / 0.92); backdrop-filter: blur(10px); padding: 10px 20px; box-shadow: var(--shadow-sm); }
.ed { height: calc(100vh - 64px * var(--nz, 1) - 59px); grid-template-columns: 270px minmax(0, 1fr) 340px; }
.ed-side, .ed-props { background: rgb(255 255 255 / 0.92); }
.ed-stage { background: transparent; padding: 14px 24px 10px; }
.stage-bar { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 6px 10px; box-shadow: var(--shadow-sm); }
.kbd-hint { margin: 0; white-space: nowrap; }
.slide-item { border-radius: 12px; }
.slide-item.sel { background: #fff0f6; border-color: var(--accent); }
.sec-head b { color: var(--brand); }
.seg { display: inline-flex; background: var(--soft); border-radius: 99px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; border-radius: 99px; padding: 6px 14px; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.seg button.on { background: #fff; color: var(--brand); box-shadow: var(--shadow-sm); }
.seg-badge { background: var(--accent); color: #fff; border-radius: 99px; font-size: 11px; padding: 1px 7px; }

/* fixed-height editor toolbar: selecting or editing never pushes the slide down */
.cv-bar { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; height: 48px; min-height: 48px; scrollbar-width: thin; border-radius: 14px; box-shadow: var(--shadow-sm); }
.cv-bar > * { flex: none; }
.cv-wrap { max-width: calc((100vh - 330px) * 16 / 9); border-radius: 14px; }

/* filmstrip under the stage */
.filmstrip { display: flex; gap: 8px; overflow-x: auto; padding: 6px 4px 8px; scrollbar-width: thin; scroll-behavior: smooth; }
.film { flex: none; width: 112px; border: 2px solid transparent; background: transparent; border-radius: 10px; padding: 0; cursor: pointer; position: relative; }
.film-th { border-radius: 8px; overflow: hidden; pointer-events: none; box-shadow: var(--shadow-sm); }
.film span { position: absolute; bottom: 3px; inset-inline-start: 4px; background: rgb(36 17 43 / 0.7); color: #fff; font-size: 10.5px; border-radius: 99px; padding: 0 6px; }
.film.on { border-color: var(--accent); }
.film.off .film-th { opacity: 0.35; }
.film:hover .film-th { box-shadow: var(--shadow); }

/* overview grid */
.ov-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.ov-item { background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: 6px; cursor: pointer; }
.ov-item.on { border-color: var(--accent); }
.ov-item.off { opacity: 0.5; }
.ov-item.drop-over { box-shadow: -4px 0 0 var(--accent); }
.ov-th { border-radius: 9px; overflow: hidden; pointer-events: none; }
.ov-meta { display: flex; gap: 6px; align-items: baseline; padding: 6px 4px 2px; font-size: 13px; }
.ov-meta span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-meta small { color: var(--muted); margin-inline-start: auto; }

/* translation panel */
.tr-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.tr-row { border: 1px solid var(--line); border-radius: 12px; padding: 8px; background: #fff; }
.tr-row.missing { border-color: #f6b9d3; background: #fff7fa; }
.tr-he { font-size: 13px; color: var(--muted); margin-bottom: 6px; white-space: pre-wrap; }
.tr-row textarea { font-size: 13.5px; }

/* case builder */
.case-builder .media-grid { margin-top: 10px; }
.logo-prev.on-dark { background: var(--brand); color: #cbb8d6; }

/* ===== v4: client design, insights, alerts, notes ===== */
.themer-top { display: grid; grid-template-columns: 160px 1fr; gap: 18px; align-items: center; }
.themer-top p { margin: 0 0 8px; font-size: 14px; line-height: 1.55; color: var(--muted); }
.logo-prev.big { width: 160px; height: 100px; border-style: solid; background: #fff; }
.chips { display: inline-flex; gap: 4px; align-items: center; }
.chip-color { width: 20px; height: 20px; border-radius: 6px; box-shadow: 0 0 0 1px rgb(0 0 0 / 0.12); display: inline-block; }
.proposals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.proposal { border: 2px solid var(--line); border-radius: 16px; background: #fff; padding: 8px; cursor: pointer; font: inherit; text-align: start; display: flex; flex-direction: column; gap: 8px; transition: border-color 0.15s, transform 0.15s; }
.proposal:hover { transform: translateY(-2px); }
.proposal.on { border-color: var(--accent); box-shadow: 0 0 0 4px rgb(232 40 122 / 0.15); }
.proposal-prev { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; min-height: 90px; transition: opacity 0.2s; }
.proposal-prev > :first-child { grid-column: span 2; }
.proposal-prev > .hint { grid-column: span 2; align-self: center; text-align: center; }
.proposal-prev .s { border-radius: 8px; box-shadow: 0 1px 4px rgb(0 0 0 / 0.12); }
.proposal-prev.wide { grid-template-columns: 2fr 1fr 1fr; margin-top: 12px; align-items: start; }
.proposal-prev.wide > :first-child { grid-column: auto; }
.proposal-prev.loading { opacity: 0.55; }
.proposal-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 0 4px 2px; flex-wrap: wrap; }
.read-badge { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 99px; }
.read-badge.good { background: #e3f6ec; color: #13704a; }
.read-badge.ok { background: #fff4d6; color: #8a5a00; }
.read-badge.bad { background: #fde4e8; color: #b0213f; }
.themer-progress { position: sticky; bottom: -1px; margin-top: 14px; padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 -6px 20px rgb(51 5 65 / 0.08); display: grid; gap: 8px; font-size: 14px; font-weight: 600; color: var(--brand); }
.tp-bar { height: 8px; border-radius: 99px; background: #efe7f3; overflow: hidden; }
.tp-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), #ffd000); border-radius: inherit; transition: width 0.3s; }
.tune { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin-bottom: 10px; }
.tune-c { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.tune-c input[type='color'] { width: 42px; height: 34px; padding: 2px; border-radius: 10px; }
.notes-field textarea { background: #fffbea; border-color: #f3e2a1; }
.ins { display: flex; flex-direction: column; gap: 18px; }
.ins-card { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 18px 20px; box-shadow: var(--shadow-sm); margin-bottom: 16px; }
.ins-card h2 { margin-bottom: 6px; }
.ins-2 { gap: 18px; }
.ins-2 .ins-card { margin: 0; }
.ins-bars { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.ins-row { display: grid; grid-template-columns: minmax(140px, 260px) 1fr 80px; gap: 12px; align-items: center; }
.ins-l { display: flex; flex-direction: column; min-width: 0; }
.ins-l b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ins-l small { font-size: 12px; color: var(--muted); }
.ins-t { height: 12px; background: #f1ecf4; border-radius: 99px; overflow: hidden; }
.ins-t i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #e8287a, #5b1a6e); }
.ins-v { font-size: 13px; color: var(--text); font-variant-numeric: tabular-nums; }
.steps-list { margin: 6px 0 12px; padding-inline-start: 20px; line-height: 1.9; font-size: 14px; }
.steps-list code { background: var(--soft); padding: 2px 8px; border-radius: 6px; }
@media (max-width: 900px) { .proposals, .proposal-prev.wide { grid-template-columns: 1fr; } .themer-top { grid-template-columns: 1fr; } }

/* ---------- settings ---------- */
.settings { display: grid; grid-template-columns: 220px 1fr; gap: 22px; align-items: start; }
.settings-tabs { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 80px; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 8px; box-shadow: var(--shadow-sm); }
.settings-tabs a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; color: var(--ink, #2a1433); text-decoration: none; font-weight: 600; font-size: 14px; }
.settings-tabs a:hover { background: var(--bg); }
.settings-tabs a.on { background: #fff0f6; color: var(--accent); }
.settings-tabs a span { width: 22px; text-align: center; }
.settings-body { min-width: 0; display: grid; gap: 16px; }
.settings-body > .ins-card, .settings-body .ins-card { margin: 0; }
.settings-body .page-head h1 { font-size: 22px; }
.settings-body .stat-tiles { grid-template-columns: repeat(3, 1fr); }
.mini-table { display: grid; gap: 2px; }
.mini-table > div { display: flex; justify-content: space-between; padding: 7px 4px; border-bottom: 1px solid var(--line); font-size: 14px; }
.mini-table > div:last-child { border: 0; }
.color-list { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 14px; }
.color-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.color-item input[type=color] { width: 34px; height: 34px; border: 0; padding: 0; background: none; cursor: pointer; }
.color-item.add { cursor: pointer; color: var(--accent); font-weight: 600; border-style: dashed; }
.role-legend { display: grid; gap: 8px; }
.role-legend > div { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; font-size: 14px; }
.role-legend b { min-width: 160px; }
.role-legend span { color: var(--muted); }
.user-list { display: grid; gap: 8px; }
.user-id { display: flex; flex-direction: column; }
.add-user { grid-template-columns: 1fr 1fr 180px auto; border: 0; padding: 0; }
.pill.role-admin { background: #330541; color: #fff; }
.pill.role-viewer { background: #e8f1ff; color: #1d4f91; }
.nav-user .pill { font-size: 11px; }
.danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px dashed #f0a3b8; border-radius: 12px; background: #fff7f9; color: var(--muted); font-size: 14px; }
.deck-card { position: relative; }
.deck-card.picked { outline: 3px solid var(--accent); }
.pick-box { position: absolute; top: 10px; inset-inline-start: 10px; z-index: 3; width: 28px; height: 28px; display: grid; place-items: center; background: rgb(255 255 255 / 0.92); border-radius: 8px; box-shadow: 0 1px 4px rgb(0 0 0 / 0.2); cursor: pointer; opacity: 0; transition: opacity 0.15s; }
.deck-card:hover .pick-box, .deck-card.picked .pick-box, .bulk-bar:not([hidden]) ~ .deck-cards .pick-box { opacity: 1; }
.pick-box input { width: 16px; height: 16px; cursor: pointer; }
.bulk-bar { position: sticky; top: 70px; z-index: 5; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 16px; margin-bottom: 14px; background: #330541; color: #fff; border-radius: 14px; box-shadow: var(--shadow); }
.bulk-bar b { margin-inline-end: auto; }
@media (max-width: 900px) { .settings { grid-template-columns: 1fr; } .settings-tabs { position: static; flex-direction: row; overflow-x: auto; } .settings-tabs a { white-space: nowrap; } .settings-body .stat-tiles, .add-user { grid-template-columns: 1fr; } }

/* ---------- follow-up / menus / comments / readiness ---------- */
.follow { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.follow-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.follow-list { display: grid; gap: 8px; }
.follow-item { display: grid; grid-template-columns: 44px 1fr auto auto; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 12px; background: var(--bg); }
.follow-item.hot { background: #fff4e5; box-shadow: inset 3px 0 0 #f39a2e; }
.follow-logo { width: 44px; height: 44px; border-radius: 10px; background: #fff; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); font-weight: 700; color: var(--brand); }
.follow-logo img { max-width: 90%; max-height: 90%; object-fit: contain; }
.follow-t { display: flex; flex-direction: column; min-width: 0; }
.follow-t small { color: var(--muted); }
.list-tabs { flex: none; }
.more-btn { font-size: 18px; line-height: 1; padding-inline: 12px; }
.deck-card.tpl { border-style: dashed; }
.menu-list { display: grid; gap: 4px; min-width: 300px; }
.menu-item { text-align: start; border: 0; background: none; font: inherit; font-size: 15px; padding: 11px 12px; border-radius: 10px; cursor: pointer; color: inherit; }
.menu-item:hover { background: var(--bg); }
.menu-item.danger-t { color: #c0244b; }
.comments { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.comments h3 { margin: 0; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.comments textarea { width: 100%; resize: vertical; }
.comments > .btn { justify-self: start; }
.c-list { display: grid; gap: 6px; }
.c-item { background: #fffbe8; border: 1px solid #f5e3a3; border-radius: 10px; padding: 8px 10px; font-size: 13px; }
.c-item.done { background: #f4f4f6; border-color: var(--line); opacity: 0.7; }
.c-item.done p { text-decoration: line-through; }
.c-item p { margin: 4px 0 6px; white-space: pre-wrap; }
.c-meta { display: flex; justify-content: space-between; gap: 8px; }
.c-meta small { color: var(--muted); }
.link-btn.muted { color: var(--muted); }
.c-badge { font-style: normal; font-size: 11px; background: #fff3c4; color: #7a5200; border-radius: 99px; padding: 0 6px; margin-inline-end: 6px; }
.checks { border-radius: 14px; padding: 12px 14px; margin-bottom: 14px; display: grid; gap: 4px; border: 1px solid var(--line); }
.checks.all-good { background: #effaf4; border-color: #bfe8d0; }
.checks.has-issues { background: #fff8ec; border-color: #f3d9a4; }
.checks-head { font-weight: 700; margin-bottom: 4px; }
.check-row { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.check-row .ck { width: 20px; height: 20px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: #d9f2e3; color: #13704a; }
.check-row.warn .ck { background: #ffe2b8; color: #8a5a00; }
.check-row.err .ck { background: #fbd5dd; color: #b0213f; }
.check-row.info .ck { background: #e8eefc; color: #1d4f91; }
.check-row .link-btn { margin-inline-start: auto; }

/* ---------- editor layout v5: resizable panes, calm header, sidebar that scrolls on its own ---------- */
.ed { grid-template-columns: var(--side-w, 270px) 8px minmax(0, 1fr) 8px var(--props-w, 340px); }
.ed-split { cursor: col-resize; position: relative; z-index: 3; touch-action: none; }
.ed-split::after { content: ''; position: absolute; inset: 0 3px; border-radius: 2px; background: transparent; transition: background 0.15s; }
.ed-split:hover::after, .ed-split.on::after { background: rgb(236 41 121 / 0.45); }
.ed-side { overflow: hidden; min-height: 0; }
.ed-side .slide-list { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-bottom: 12px; isolation: isolate; }
.ed-side .sec-head { position: sticky; top: 0; z-index: 2; background: #fff; box-shadow: 0 6px 6px -6px rgb(51 5 65 / 0.12); }
.ed-side .side-add { position: static; flex: none; z-index: 4; box-shadow: 0 -6px 12px -10px rgb(51 5 65 / 0.25); }
.ed-side .side-top { flex: none; }
.ed-props { min-height: 0; }
.ed-head { gap: 10px; min-height: 56px; }
.ed-head .title-in { max-width: 320px; }
.ed-head-actions { gap: 8px; }
.ed-head .more-btn, .stage-bar .more-btn { font-size: 18px; line-height: 1; }
.menu-item { display: flex; flex-direction: column; gap: 2px; }
.menu-item small { color: var(--muted); font-size: 12px; font-weight: 400; }
.stage-bar { gap: 6px; }
.stage-bar .kbd-hint { display: none; }
@media (max-width: 1100px) { .ed { grid-template-columns: var(--side-w, 220px) 6px minmax(0, 1fr) 6px var(--props-w, 290px); } }
@media (max-width: 900px) { .ed { grid-template-columns: 1fr; } .ed-split { display: none; } }

/* canvas: move grip + rotate handle; while typing only the grip stays */
.cv-grip, .cv-rot { left: 50%; transform: translateX(-50%); width: 22px; height: 18px; border-radius: 6px; font-size: 12px; line-height: 14px; text-align: center; color: #ec2979; cursor: grab; display: grid; place-items: center; }
.cv-grip { top: -26px; }
.cv-rot { top: -50px; width: 20px; height: 20px; border-radius: 50%; cursor: alias; }
.cv-sel.is-line .cv-rot, .cv-sel.typing .cv-rot, .cv-sel.typing .cv-h-se, .cv-sel.typing .cv-h-sw, .cv-sel.typing .cv-h-ne, .cv-sel.typing .cv-h-nw { display: none; }
.cv-sel.typing { outline-style: dashed; outline-color: rgb(236 41 121 / 0.6); }
.cv-stage .el-text { cursor: move; }
.cv-stage .cv-editing { cursor: text; }

/* comments: mentions + history */
.c-input { position: relative; }
.c-sugg { position: absolute; inset-inline: 0; top: 100%; z-index: 30; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 4px; display: grid; }
.c-sugg button { display: flex; justify-content: space-between; gap: 8px; border: 0; background: none; padding: 6px 8px; border-radius: 8px; cursor: pointer; font: inherit; font-size: 13px; text-align: start; }
.c-sugg button:hover { background: var(--bg); }
.c-sugg small { color: var(--muted); }
.c-at { color: var(--accent); }
.c-history-list { display: grid; gap: 8px; max-height: 70vh; overflow: auto; }
.c-history-list h3 { margin: 6px 0 0; font-size: 14px; }
.c-slide { font-size: 12px; margin: 2px 0; }
.c-item.mention { text-align: start; font: inherit; cursor: pointer; width: 100%; }
.c-item.mention.new { box-shadow: inset 3px 0 0 var(--accent); }
.bell-slot { display: inline-flex; }
.bell { position: relative; font-size: 16px; }
.bell-n { position: absolute; top: -2px; inset-inline-end: -2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--accent); color: #fff; font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; }

/* case studies chooser: logo + name */
.case-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.case-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 10px 12px; border: 2px solid var(--line); border-radius: 16px; background: #fff; cursor: pointer; font: inherit; transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s; }
.case-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); border-color: #e3cfe8; }
.case-tile.on { border-color: var(--accent); box-shadow: 0 0 0 4px rgb(232 40 122 / 0.12); }
.case-tile.used { opacity: 0.55; }
.ct-logo { width: 100%; height: 64px; display: grid; place-items: center; border-radius: 10px; background: #330541; overflow: hidden; }
.ct-logo img { max-width: 80%; max-height: 46px; object-fit: contain; }
.ct-logo b { color: #ffd000; font-size: 22px; }
.ct-name { font-weight: 700; font-size: 14px; text-align: center; }
.ct-fit, .ct-used { font-size: 11px; border-radius: 99px; padding: 1px 8px; background: #e3f6ec; color: #13704a; }
.ct-used { background: #f1eef3; color: var(--muted); }
.case-tile .check-badge { position: absolute; top: 8px; inset-inline-start: 8px; }

/* add-slide menu, influencer picker, team fields */
.type-opt { position: relative; }
.type-ic { font-size: 22px; line-height: 1; margin-bottom: 4px; }
.inf-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; max-height: 360px; overflow: auto; padding: 2px; }
.inf-opt { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; border: 2px solid transparent; border-radius: 12px; background: var(--bg); padding: 6px 4px; cursor: pointer; font: inherit; font-size: 11px; }
.inf-opt img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }
.inf-opt span { text-align: center; line-height: 1.2; }
.inf-opt.on { border-color: var(--accent); background: #fff0f6; }
.inf-opt .check-badge { position: absolute; top: 2px; inset-inline-start: 2px; }
.person-extra { display: grid; gap: 4px; width: 100%; }
.check.sm { font-size: 12px; }

/* the deck editor uses the full window under the top bar */
.page.page-full { padding: 0; max-width: none; margin: 0; }
.page-full .ed-head { margin: 0; }


/* ---------- editor v6: settings panel on demand / pinned; calm stage bar; slide fits the screen ---------- */
.ed { position: relative; }
.ed:not(.props-pinned) { grid-template-columns: var(--side-w, 270px) 8px minmax(0, 1fr) 0 0; }
.ed:not(.props-pinned) .ed-split.props { display: none; }
.ed:not(.props-pinned) .ed-props { position: absolute; inset-block: 0; inset-inline-end: 0; width: min(var(--props-w, 340px), 92vw); z-index: 25; box-shadow: 0 0 40px rgb(51 5 65 / 0.18); transform: translateX(-104%); visibility: hidden; transition: transform 0.22s ease, visibility 0.22s; }
[dir="ltr"] .ed:not(.props-pinned) .ed-props { transform: translateX(104%); }
.ed:not(.props-pinned) .ed-props.shown { transform: none; visibility: visible; }
.ed-props { padding: 0; display: flex; flex-direction: column; }
.props-top { display: flex; align-items: center; gap: 4px; padding: 8px 10px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 2; }
.props-body { padding: 16px 18px 24px; overflow: auto; flex: 1; min-height: 0; }
.ed-stage { overflow: hidden; gap: 8px; padding: 10px 18px; }
.ed-stage .cv-host { flex: 1; min-height: 0; }
.ed-stage .cv-wrap, .ed-stage > .preview { width: 100%; max-width: var(--cv-max-w, 100%); margin-inline: auto; }
.ed-stage .cv-bar { max-width: var(--cv-max-w, 100%); width: 100%; margin-inline: auto; }
.ed-stage .filmstrip { flex: none; }
.stage-bar { display: flex; align-items: center; gap: 6px; height: 44px; padding: 0 8px; flex-wrap: nowrap; white-space: nowrap; }
.sb-nav { display: inline-flex; align-items: center; gap: 2px; background: var(--bg); border-radius: 10px; padding: 2px; }
.sb-count { min-width: 54px; text-align: center; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sb-count b { color: var(--brand); }
.sb-ic { width: 32px; height: 32px; display: inline-grid; place-items: center; border: 0; border-radius: 9px; background: transparent; color: var(--brand); font-size: 16px; cursor: pointer; flex: none; }
.sb-ic:hover:not(:disabled) { background: #efe7f3; }
.sb-ic:disabled { opacity: 0.3; cursor: default; }
.sb-ic.on { background: #fff0f6; color: var(--accent); }
.sb-sec { height: 32px; border-radius: 9px; border: 1px solid var(--line); background: #fff; padding: 0 10px; font: inherit; font-size: 13px; color: var(--brand); max-width: 200px; }
.sb-sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.ed-side .sec-head { cursor: default; }
.ed-side .sec-head:hover { background: #fff; }
.lib-group.folded .lib-grid { max-height: 190px; overflow: hidden; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.google-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: #fff; border: 1px solid #dadce0; color: #3c4043; font-weight: 600; height: 44px; }
.google-btn:hover { background: #f8f9fa; }
.app-name { font-weight: 900; letter-spacing: -0.02em; }
.login-card h1.app-name { font-size: 44px; margin: 6px 0 0; color: var(--brand); }
.app-tagline { margin: 0 0 18px; color: var(--muted); font-size: 15px; }
.pw-login { margin-top: 10px; }
.pw-login summary { cursor: pointer; color: var(--muted); font-size: 13px; text-align: center; }
.brand .app-name { font-size: 20px; color: var(--brand); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: #efe7f3; color: var(--brand); font-weight: 700; flex: none; }

/* multi-select on the canvas */
.cv-sel.multi { outline-style: dashed; }
.cv-sel.multi .cv-h-se, .cv-sel.multi .cv-h-sw, .cv-sel.multi .cv-h-ne, .cv-sel.multi .cv-h-nw, .cv-sel.multi .cv-rot { display: none; }
.cv-stage .in-group { outline: 1.5px solid rgb(236 41 121 / 0.7); outline-offset: 1px; }
.cv-marquee { position: absolute; z-index: 30; border: 1.5px dashed #ec2979; background: rgb(236 41 121 / 0.08); pointer-events: none; border-radius: 3px; }
.cv-count { font-size: 12px; font-weight: 700; color: var(--accent); padding: 0 6px; }

/* nothing in the editor may widen the page (slide elements that hang off a slide, the filmstrip) */
html, body { overflow-x: hidden; }
.ed, .ed-stage, .cv-host, .cv-wrap { overflow: hidden; }
.cv-wrap { overflow: visible; }
.cv-stage { overflow: hidden; }


/* design language picker */
.skin-pick { display: grid; gap: 10px; margin-bottom: 18px; }
.skin-pick h3 { margin: 0; }
.skin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.skin-card { display: flex; flex-direction: column; gap: 4px; padding: 6px 6px 8px; border: 2px solid var(--line); border-radius: 14px; background: #fff; cursor: pointer; font: inherit; text-align: start; transition: border-color 0.15s, transform 0.15s; }
.skin-card:hover { transform: translateY(-2px); }
.skin-card.on { border-color: var(--accent); box-shadow: 0 0 0 4px rgb(232 40 122 / 0.12); }
.skin-card b { font-size: 13px; }
.skin-card small { font-size: 11px; color: var(--muted); line-height: 1.3; }
.skin-prev { border-radius: 8px; overflow: hidden; pointer-events: none; aspect-ratio: 16 / 9; background: #f3eef6; }

/* ---------- creative studio toolbar (v7): insert row + format row, full stage width ---------- */
.ed-stage .cv-bar { max-width: none; width: 100%; }
.cv-bar { display: flex; flex-direction: column; align-items: stretch; gap: 0; height: auto; min-height: 0; padding: 0; overflow: visible; flex-wrap: nowrap; }
.cv-row { display: flex; align-items: center; gap: 3px; padding: 4px 8px; min-height: 38px; flex-wrap: wrap; row-gap: 2px; }
.cv-row > * { flex: none; }
.cv-row .grow { flex: 1; }
.cv-row-ins { border-bottom: 1px solid var(--line); }
.cv-row-ins .cv-btn.ins { font-weight: 700; color: var(--brand, #330541); }
.cv-row-fmt { background: #faf7fc; border-radius: 0 0 14px 14px; }
.cv-row-fmt.empty .hint { font-size: 12px; margin: 0; padding-inline: 4px; color: var(--muted, #8a7d92); }
.cv-btn.b { font-weight: 900; } .cv-btn.i { font-style: italic; font-family: Georgia, serif; } .cv-btn.u { text-decoration: underline; }
.cv-btn.danger-t:hover:not(:disabled) { background: #fde8ef; color: #c0164f; }
.cv-color { display: inline-flex; flex-direction: column; align-items: center; gap: 1px; padding: 3px 8px 4px; line-height: 1; }
.cv-color i { display: block; width: 18px; height: 4px; border-radius: 2px; box-shadow: 0 0 0 1px #d8cfe0; }
.cv-color-ic { font-size: 13px; font-weight: 800; }
.cv-sel-in { height: 30px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font: inherit; font-size: 12.5px; padding: 0 6px; max-width: 150px; }
.cv-num { height: 30px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 12.5px; padding: 0 4px; text-align: center; }
.cv-range { width: 74px; accent-color: #ec2979; }
.cv-range-w { display: inline-flex; align-items: center; gap: 6px; direction: ltr; }
.cv-range-v { min-width: 34px; font-size: 12px; color: var(--muted, #6b5a72); font-variant-numeric: tabular-nums; }
.cv-pop { position: absolute; z-index: 9999; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 14px 40px rgb(36 17 43 / 0.22); padding: 10px; }
.cv-colorpop { display: grid; gap: 10px; min-width: 188px; }
.cv-swatches { display: grid; grid-template-columns: repeat(6, 24px); gap: 6px; }
.cv-swatches .cv-sw { width: 24px; height: 24px; }
.cv-custom { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; }
.cv-custom input { width: 38px; height: 26px; border: 0; padding: 0; background: none; cursor: pointer; }
.cv-shapes { display: grid; grid-template-columns: repeat(5, 64px); gap: 4px; }
.cv-shapes button { display: grid; justify-items: center; gap: 2px; border: 1px solid transparent; background: none; border-radius: 10px; padding: 6px 2px; cursor: pointer; font: inherit; }
.cv-shapes button:hover { background: #f3edf7; border-color: #e4d9ea; }
.cv-shapes span { font-size: 22px; line-height: 1; color: #ec2979; }
.cv-shapes small { font-size: 10.5px; color: var(--muted, #6d6275); }
.cv-guide { position: absolute; z-index: 19; pointer-events: none; }
.cv-guide.v { top: 0; bottom: 0; width: 0; border-left: 1px dashed #ff3d8b; }
.cv-guide.h { left: 0; right: 0; height: 0; border-top: 1px dashed #ff3d8b; }
.cv-drop { position: absolute; inset: 0; z-index: 30; display: grid; place-items: center; background: rgb(51 5 65 / 0.55); color: #fff; font-weight: 800; font-size: 18px; border: 3px dashed #fff; border-radius: 14px; pointer-events: none; }
.cv-drop[hidden], .cv-guide[hidden] { display: none; }
/* several objects: corner handles scale the whole group together */
.cv-sel.multi .cv-h-se, .cv-sel.multi .cv-h-sw, .cv-sel.multi .cv-h-ne, .cv-sel.multi .cv-h-nw { display: block; }
.cv-host > .hint.center { margin: 0; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* a smaller filmstrip leaves more height to the slide */
.ed-stage .film { width: 86px; }
.ed-stage .filmstrip { padding: 2px 4px 4px; }
.ed-stage { gap: 6px; padding: 8px 14px; }

/* ---------- people working on the deck right now ---------- */
.who { display: inline-flex; align-items: center; }
.who-dot { width: 28px; height: 28px; border-radius: 50%; color: #fff; font-size: 12.5px; font-weight: 800; display: grid; place-items: center; border: 2px solid #fff; margin-inline-start: -6px; box-shadow: 0 1px 4px rgb(0 0 0 / .15); cursor: default; }
.who-dot:first-child { margin-inline-start: 0; }
.si-who { position: absolute; top: 4px; inset-inline-end: 34px; width: 18px; height: 18px; border-radius: 50%; color: #fff; font-size: 10px; font-weight: 800; display: grid; place-items: center; border: 2px solid #fff; z-index: 2; }
.slide-item { position: relative; }
.sb-here { font-size: 12px; font-weight: 700; color: #7b4d96; background: #f3edf7; border-radius: 99px; padding: 3px 10px; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.toast.warn { background: #7a4a00; }

/* ---------- tools as a side panel (v8): opens / closes, never shrinks the slide ---------- */
.cv-host-tools { position: relative; }
.cv-host-tools.tools-open { padding-inline-end: 292px; }
.cv-host-tools > .cv-bar { position: absolute; top: 0; bottom: 0; inset-inline-end: 0; width: 280px; max-width: none; height: auto; display: none; flex-direction: column; gap: 0; padding: 0; overflow-y: auto; overflow-x: hidden; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 8px 28px rgb(53 6 66 / 0.12); z-index: 6; scrollbar-width: thin; }
.cv-host-tools.tools-open > .cv-bar { display: flex; }
.cv-host-tools.tools-open > .cv-tools-tab { display: none; }
.cv-tools-tab { position: absolute; top: 0; inset-inline-end: 0; z-index: 6; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 8px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 6px 20px rgb(53 6 66 / 0.12); cursor: pointer; font: inherit; color: var(--brand, #330541); }
.cv-tools-tab span { font-size: 20px; }
.cv-tools-tab b { font-size: 12px; writing-mode: vertical-rl; }
.cv-tools-tab:hover { background: #f6f0f9; }
.cv-p-head { display: flex; align-items: center; gap: 2px; padding: 8px 10px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 1; }
.cv-p-head b { font-size: 14px; margin-inline-end: 6px; }
.cv-p-sec { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); }
.cv-p-sec h4 { margin: 0 0 8px; font-size: 11.5px; font-weight: 800; color: var(--muted, #8a7d92); letter-spacing: .02em; }
.cv-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.cv-tile { display: grid; justify-items: center; gap: 3px; padding: 9px 2px 7px; border: 1px solid #ece4f1; border-radius: 12px; background: #fbf9fc; cursor: pointer; font: inherit; color: var(--brand, #330541); }
.cv-tile span { font-size: 19px; line-height: 1; font-weight: 800; }
.cv-tile small { font-size: 11px; font-weight: 700; white-space: nowrap; }
.cv-tile:hover:not(:disabled) { background: #f3ebf8; border-color: #dccbe7; }
.cv-tile:disabled { opacity: .4; cursor: default; }
.cv-p-sec > .cv-btn { margin-top: 8px; }
.cv-fmt { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.cv-fmt .cv-sel-in { max-width: none; flex: 1 1 120px; }
.cv-fmt .cv-range { flex: 1 1 100px; }
.cv-fmt .cv-range-w { flex: 1 1 140px; }
.cv-p-fmt .hint { margin: 0; font-size: 12.5px; }
.cv-p-tips { padding: 10px 12px; font-size: 11px; line-height: 1.6; color: var(--muted, #8a7d92); }
.cv-btn.primary-t { background: var(--accent, #ec2979); color: #fff; width: 100%; padding: 8px; }
.cv-layouts { grid-template-columns: repeat(3, 88px); }
.cv-imgpop { display: grid; gap: 8px; width: 300px; }
.cv-imggrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; max-height: 260px; overflow-y: auto; }
.cv-imggrid button { aspect-ratio: 16 / 10; border: 0; border-radius: 8px; background: #eee center / cover; cursor: pointer; }
.cv-imggrid button:hover { outline: 2px solid var(--accent, #ec2979); }
.cv-wrap.painting, .cv-wrap.painting .el { cursor: copy !important; }

/* ---------- Michi brand ---------- */
.topnav .brand { display: inline-flex; align-items: center; gap: 8px; }
.topnav .brand .michi-mark { width: 34px; height: 34px; transition: transform .25s; }
.topnav .brand:hover .michi-mark { transform: rotate(-8deg) scale(1.06); }
.topnav .brand .brand-42 { height: 14px; opacity: .55; margin-inline-start: 4px; }
.login-michi { width: 96px; height: 96px; display: block; margin: 0 auto 6px; animation: michi-hi 1.6s ease-in-out 0.3s 1; }
@keyframes michi-hi { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-10deg); } 50% { transform: rotate(8deg); } 75% { transform: rotate(-4deg); } }

/* ---------- thumbnails: drawn at a real slide size (960px) and scaled down, so browsers with a minimum
   font size don't blow tiny text up into dark blocks, and thumbnails look exactly like the slide ---------- */
.mini, .film-th, .lib-thumb, .ov-th { position: relative; aspect-ratio: 16 / 9; overflow: hidden; }
.mini { --tw: 76; }
.film-th { --tw: 82; }
.mini > .s, .film-th > .s, .lib-thumb > .s, .ov-th > .s { position: absolute; top: 0; left: 0; width: 960px !important; max-width: none !important; height: auto; transform: scale(calc(var(--tw, 80) / 960)); transform-origin: 0 0; }

/* ---------- folded case-study block (library, picker, add-slide window) ---------- */
.fold-head { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; cursor: pointer; font: inherit; color: inherit; text-align: start; }
.fold-head:hover { background: #faf6fc; }
.fold-head h2 { margin: 0; font-size: 18px; }
.fold-chev { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #f1e9f6; color: var(--brand, #330541); font-weight: 900; font-size: 18px; transition: transform .2s; }
.open > .fold-head .fold-chev, .fold-head[aria-expanded="true"] .fold-chev { transform: rotate(-90deg); background: var(--accent, #ec2979); color: #fff; }
.lib-cases .case-tiles, .add-cases .case-tiles { margin-top: 12px; }
.case-open { margin-top: 14px; padding: 14px; border-radius: 14px; background: #faf6fc; border: 1px solid #eee3f4; }
.case-open .lib-group-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.case-open h3 { margin: 0; flex: 1; }
.add-cases { margin-top: 14px; }
.add-cases .fold-head .type-ic { font-size: 20px; }
.add-cases .fold-head b { font-size: 16px; }
.cv-iconpop { display: grid; gap: 8px; width: 316px; }
.cv-icons { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; max-height: 260px; overflow-y: auto; padding: 4px; background: #3a1047; border-radius: 10px; }
.cv-icons button { aspect-ratio: 1; border: 0; border-radius: 8px; background: transparent; cursor: pointer; padding: 5px; }
.cv-icons button:hover { background: rgb(255 255 255 / .14); }
.cv-icons img { width: 100%; height: 100%; filter: invert(1); }
.cv-sw.on { box-shadow: 0 0 0 2px var(--accent, #ec2979); }
.cv-tiles { grid-template-columns: repeat(3, 1fr); }

/* ---------- one side panel next to the slide: design tools + slide settings (v9) ---------- */
.ed-props { display: none !important; }
.ed:not(.props-pinned), .ed.props-pinned { grid-template-columns: var(--side-w, 270px) 8px minmax(0, 1fr) 0 0; }
.stage-main { display: flex; gap: 12px; flex: 1; min-height: 0; align-items: stretch; }
.stage-main > .cv-host, .stage-main > .preview { flex: 1; min-width: 0; }
.stage-main > .preview { align-self: flex-start; }
.ed-panel { flex: none; width: 300px; display: flex; flex-direction: column; min-height: 0; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 8px 28px rgb(53 6 66 / 0.10); overflow: hidden; }
.ed-panel .p-head { display: flex; align-items: center; gap: 4px; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.ed-panel .p-tab { border: 0; background: transparent; font: inherit; font-weight: 700; font-size: 13.5px; padding: 7px 12px; border-radius: 10px; cursor: pointer; color: var(--muted, #7d7186); }
.ed-panel .p-tab.on { background: #f3ebf8; color: var(--brand, #330541); }
.ed-panel .p-body { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
.ed-panel .p-open { display: none; }
.ed-panel.closed { width: auto; background: transparent; border: 0; box-shadow: none; }
.ed-panel.closed .p-head, .ed-panel.closed .p-body { display: none; }
.ed-panel.closed .p-open { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 6px 20px rgb(53 6 66 / 0.12); cursor: pointer; font: inherit; color: var(--brand, #330541); }
.ed-panel.closed .p-open span { font-size: 20px; }
.ed-panel.closed .p-open b { font-size: 12px; writing-mode: vertical-rl; }
.ed-panel .p-empty { padding: 18px 14px; color: var(--muted, #7d7186); font-size: 13px; }
.ed-panel .p-tools > .cv-bar { position: static; display: flex; flex-direction: column; width: auto; height: auto; border: 0; border-radius: 0; box-shadow: none; overflow: visible; padding: 0; }
.ed-panel .cv-p-head { position: static; }
/* slide settings look like the design tools: calm sections, no boxes inside boxes, no inner scrollbars */
.ed-panel .props-body { padding: 4px 14px 16px; }
.ed-panel .props-body h2 { font-size: 15px; margin: 12px 0 6px; }
.ed-panel .props-body h3 { font-size: 11.5px; font-weight: 800; color: var(--muted, #8a7d92); margin: 14px 0 6px; letter-spacing: .02em; }
.ed-panel .props-body .field { margin-bottom: 10px; }
.ed-panel .props-body .field-label { font-size: 11.5px; font-weight: 800; color: var(--muted, #8a7d92); }
.ed-panel .props-body input, .ed-panel .props-body select, .ed-panel .props-body textarea { font-size: 13px; border-radius: 10px; }
.ed-panel .pick-list { max-height: none !important; overflow: visible !important; border: 0 !important; padding: 0 !important; display: grid; gap: 2px; }
.ed-panel .pick { padding: 4px 6px; border-radius: 10px; gap: 8px; font-size: 13px; }
.ed-panel .pick:hover { background: #faf6fc; }
.ed-panel .pick img { max-height: 30px; width: 54px; object-fit: contain; border-radius: 6px; }

/* ---------- Michi logo (icon + name + slogan) ---------- */
.michi-logo { display: inline-flex; align-items: center; gap: 8px; color: var(--brand, #330541); text-decoration: none; }
.michi-logo img { width: 40px; height: 40px; transition: transform .25s; }
.brand:hover .michi-logo img { transform: rotate(-6deg) scale(1.06); }
.michi-logo .ml-t { display: grid; line-height: 1; }
.michi-logo .ml-t b { font-size: 24px; font-weight: 800; letter-spacing: -0.01em; }
.michi-logo .ml-t small { font-size: 10.5px; font-weight: 700; color: #ec2979; margin-top: 3px; white-space: nowrap; }
.michi-logo.big { gap: 14px; justify-content: center; margin: 0 auto 14px; display: flex; }
.michi-logo.big img { width: 92px; height: 92px; animation: michi-hi 1.6s ease-in-out .3s 1; }
.michi-logo.big .ml-t b { font-size: 52px; }
.michi-logo.big .ml-t small { font-size: 14px; margin-top: 6px; }

/* ---------- per-slide background, table editor, summary picker ---------- */
.cv-bgrow { display: flex; gap: 6px; flex-wrap: wrap; width: 100%; margin-bottom: 4px; }
.cv-bgsw { width: 40px; aspect-ratio: 16 / 9; border-radius: 6px; border: 2px solid transparent; background: #ccc center / cover; cursor: pointer; box-shadow: 0 0 0 1px var(--line); }
.cv-bgsw.on, .cv-bgsw:hover { border-color: var(--accent, #ec2979); }
.tb-edit { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)) 30px; gap: 6px; margin-top: 10px; max-height: 60vh; overflow: auto; }
.tb-edit textarea { resize: vertical; min-height: 36px; font: inherit; font-size: 14px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; }
.tb-edit textarea.head { background: #fff6cc; font-weight: 700; }
.tb-x { border: 0; background: transparent; color: var(--muted); cursor: pointer; border-radius: 6px; }
.tb-x:hover:not(:disabled) { background: #fde8ef; color: #c0164f; }
.tb-x:disabled { opacity: .25; }
.sum-pick { margin-top: 10px; }
.sum-pick .sum-row { display: grid; gap: 4px; padding: 2px 0; }
.sum-pick .sum-row.on { background: #faf6fc; border-radius: 10px; padding: 4px 6px; }
.sum-pick .sum-row input[type="text"], .sum-pick .sum-row > input { font-size: 12.5px; padding: 4px 8px; }


/* the Michi logo keeps its own colors (older .brand rules painted the image and pilled the text) */
.brand .michi-logo, .brand .michi-logo span { background: none; padding: 0; border-radius: 0; font-size: inherit; }
.brand .michi-logo img { filter: none; height: 40px; width: 40px; }
.brand .michi-logo .ml-t b { font-size: 24px; color: var(--brand, #330541); }
.brand .michi-logo .ml-t small { font-size: 10.5px; color: #ec2979; }


/* ---------- slide library header (one calm row) ---------- */
.lib-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; padding: 2px 0 14px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.lib-head-t h2 { margin: 0; font-size: 22px; display: flex; align-items: baseline; gap: 10px; }
.lib-head-t h2 small { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.lib-head-t p { margin: 3px 0 0; font-size: 13px; }
.lib-head-a { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lib-head-a .btn { height: 38px; display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; border-radius: 12px; font-size: 13.5px; white-space: nowrap; }
.lib-head-a .btn span { font-size: 15px; }
.lib-head-a .seg { height: 38px; }
.lib-head-sep { width: 1px; height: 24px; background: var(--line); margin: 0 4px; }

/* ---------- folded chapters: nested blocks and the master tile ---------- */
.lib-cases.nested { margin: 0 0 10px; }
.lib-cases.nested > .fold-head { padding: 9px 12px; background: #faf6fc; }
.lib-cases.nested > .fold-head h2 { font-size: 15px; }
.fold-inner { margin-top: 12px; display: grid; gap: 8px; }
.fold-sub { margin: 14px 2px 0; font-size: 12px; font-weight: 800; color: var(--muted); letter-spacing: .02em; }
.case-tile.master { border-color: #f3d36b; background: #fffaf0; }
.case-tile.master .ct-logo b { color: #e0a800; font-size: 26px; }

/* ---------- missing logos ---------- */
.miss-logos { margin-bottom: 22px; padding: 16px; border-radius: 16px; background: #fff8ec; border: 1px solid #f5dfb3; }
.miss-logos .ok-line { margin: 0; color: #1d7a4f; font-weight: 700; }
.miss-head h2 { margin: 0; font-size: 17px; }
.miss-head p { margin: 4px 0 12px; font-size: 13px; }
.miss-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.miss-item { display: grid; justify-items: center; gap: 6px; padding: 12px 8px; background: #fff; border-radius: 14px; border: 1px solid #f0e2c4; text-align: center; }
.miss-item .person-img { width: 64px; height: 64px; border-radius: 14px; border: 2px dashed #e7c98a; background: #fffdf7; cursor: pointer; font-size: 20px; color: #c99a2e; }
.miss-item b { font-size: 13px; }
.miss-item small { font-size: 11px; }

/* ---------- Michi winks when you hover the logo ---------- */
.michi-logo .ml-ic { display: inline-block; width: 40px; height: 40px; line-height: 0; }
.michi-logo.big .ml-ic { width: 92px; height: 92px; }
.michi-logo .ml-ic svg { width: 100%; height: 100%; overflow: visible; }
.michi-logo .m-wink { opacity: 0; }
.brand:hover .michi-logo .m-eye, .michi-logo.big:hover .m-eye { animation: m-eye 1.1s ease-in-out 1; }
.brand:hover .michi-logo .m-wink, .michi-logo.big:hover .m-wink { animation: m-wink 1.1s ease-in-out 1; }
.brand:hover .michi-logo .m-crown, .michi-logo.big:hover .m-crown { animation: m-crown 1.1s ease-in-out 1; }
@keyframes m-eye { 0%, 12%, 70%, 100% { opacity: 1; } 18%, 64% { opacity: 0; } }
@keyframes m-wink { 0%, 12%, 70%, 100% { opacity: 0; } 18%, 64% { opacity: 1; } }
@keyframes m-crown { 0%, 100% { transform: translate(37px, 1.5px) rotate(14deg); } 30% { transform: translate(37px, -1px) rotate(4deg); } 60% { transform: translate(37px, 1.5px) rotate(18deg); } }
.brand .michi-logo .ml-ic, .brand .michi-logo .ml-t { background: none; padding: 0; }

/* ---------- guided tour ---------- */
.tour { position: fixed; inset: 0; z-index: 10000; }
.tour-spot { position: fixed; border-radius: 14px; box-shadow: 0 0 0 9999px rgb(24 4 32 / .58), 0 0 0 3px #ffd000; transition: all .28s ease; pointer-events: none; }
.tour-bubble { position: fixed; width: min(340px, calc(100vw - 24px)); background: #fff; border-radius: 18px; padding: 16px 18px 14px; box-shadow: 0 18px 50px rgb(24 4 32 / .35); transition: top .28s ease, left .28s ease; }
.tour-bubble h3 { margin: 4px 0 6px; font-size: 17px; color: var(--brand); }
.tour-bubble p { margin: 0 0 12px; font-size: 13.5px; line-height: 1.55; }
.tour-step { font-size: 11px; font-weight: 800; color: #ec2979; }
.tour-btns { display: flex; align-items: center; gap: 6px; }
.tour-btn { white-space: nowrap; }

/* ---------- slide list badges: client viewing time, changed since my last visit ---------- */
.v-badge { display: inline-block; font-style: normal; font-size: 10.5px; font-weight: 700; color: #7b4d96; background: #f3ebf8; border-radius: 99px; padding: 0 6px; margin-top: 2px; width: max-content; }
.new-badge { display: inline-block; font-style: normal; font-size: 10px; font-weight: 800; color: #fff; background: #ec2979; border-radius: 99px; padding: 0 6px; margin-inline-end: 4px; }

/* ---------- keyboard shortcuts ---------- */
.kb h3 { margin: 14px 0 6px; font-size: 13px; color: var(--muted); }
.kb-row { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.kb kbd { display: inline-block; min-width: 22px; text-align: center; font: 600 12px/1 ui-monospace, Consolas, monospace; padding: 4px 6px; border-radius: 6px; background: #f6f2f9; border: 1px solid #ddd2e5; border-bottom-width: 2px; }

/* ---------- brief: drop a file, and what Michi prepared ---------- */
.brief-drop { border: 2px dashed transparent; border-radius: 14px; transition: border-color .15s, background .15s; }
.brief-drop.over { border-color: #ec2979; background: #fff2f8; }
.brief-drop textarea { width: 100%; }
.brief-acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.brief-files { display: flex; gap: 6px; flex-wrap: wrap; }
.brief-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; background: #f3ebf8; border-radius: 99px; padding: 3px 4px 3px 10px; }
.brief-chip button { border: 0; background: none; cursor: pointer; color: var(--muted); }
.callout.ai-plan { background: linear-gradient(135deg, #fbf7ff, #fff6fb); border: 1px solid #ead9f3; }
.ai-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 10px 0; }
.ai-grid > div { background: #fff; border-radius: 12px; padding: 10px 12px; border: 1px solid #efe4f5; display: grid; gap: 3px; }
.ai-grid small { font-size: 11px; font-weight: 800; color: #ec2979; }
.ai-grid b, .ai-grid span { font-size: 13px; line-height: 1.45; }
.callout.warn { background: #fff8ec; border: 1px solid #f5dfb3; }


/* ---------- right-click menu on the slide ---------- */
.cv-ctx { position: fixed; z-index: 10001; min-width: 230px; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 44px rgb(36 17 43 / .24); display: grid; gap: 1px; font-size: 13.5px; }
.cv-ctx .ctx-i { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 7px 10px; border: 0; background: none; border-radius: 9px; font: inherit; text-align: start; cursor: pointer; color: var(--text); }
.cv-ctx .ctx-i:hover:not(:disabled) { background: #f3ebf8; }
.cv-ctx .ctx-i:disabled { opacity: .4; cursor: default; }
.cv-ctx .ctx-i.danger { color: #c0164f; }
.cv-ctx .ctx-i kbd { font: 600 11px/1 ui-monospace, Consolas, monospace; color: var(--muted); background: none; border: 0; }
.cv-ctx hr { border: 0; border-top: 1px solid var(--line); margin: 4px 2px; }
.cv-ctx .ctx-row { display: flex; align-items: center; gap: 2px; padding: 4px 6px; }
.cv-ctx .ctx-row small { flex: 1; color: var(--muted); font-size: 12px; }
.cv-ctx .ctx-row button { border: 0; background: none; width: 28px; height: 28px; border-radius: 8px; cursor: pointer; font-size: 15px; }
.cv-ctx .ctx-row button:hover { background: #f3ebf8; }

/* ---------- locked objects: no handles, a small lock ---------- */
.cv-sel.locked { outline-style: dotted; outline-color: #7b4d96; }
.cv-sel.locked .cv-h { display: none !important; }
.cv-sel.locked::after { content: '🔒'; position: absolute; top: -12px; inset-inline-end: -12px; font-size: 13px; background: #fff; border-radius: 99px; padding: 1px 4px; box-shadow: 0 1px 4px rgb(0 0 0 / .2); }


/* ---------- "סידור" in the design panel (everything from the right-click menu) ---------- */
.cv-arrange { width: 100%; display: grid; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.cv-arrange > small { font-size: 11.5px; font-weight: 800; color: var(--muted); }
.cv-arr-row { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; }
.cv-arr-l { font-size: 11.5px; color: var(--muted); margin-inline-end: auto; }

/* ---------- 42 design elements ---------- */
.cv-el42 { display: grid; gap: 8px; width: 340px; }
.cv-el42-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; max-height: 360px; overflow-y: auto; padding: 6px; background: #3a1047; border-radius: 12px; }
.cv-el42-grid button { display: grid; justify-items: center; gap: 4px; padding: 6px 4px; border: 0; border-radius: 10px; background: transparent; cursor: pointer; }
.cv-el42-grid button:hover { background: rgb(255 255 255 / .12); }
.cv-el42-grid img { width: 100%; height: 46px; object-fit: contain; }
.cv-el42-grid small { color: #fff; font-size: 10.5px; line-height: 1.2; }

/* ---------- the tour: Michi talks ---------- */
.tour-top { display: flex; align-items: center; gap: 10px; margin-bottom: 2px; }
.tour-face { width: 38px; height: 38px; animation: michi-hi 1.4s ease-in-out .2s 1; }
.tour-dots { display: flex; gap: 4px; flex-wrap: wrap; }
.tour-dots i { width: 7px; height: 7px; border-radius: 50%; background: #eadff0; }
.tour-dots i.done { background: #c9a6dd; }
.tour-dots i.on { background: #ec2979; width: 18px; border-radius: 99px; }
.tour-bubble { border: 2px solid #ffd000; background: linear-gradient(160deg, #fff 70%, #fff8e0); }
.tour-bubble h3 { font-size: 18px; }


/* ---------- client preview, versions, people cards, toast actions ---------- */
.client-preview { position: fixed; inset: 0; z-index: 9000; background: #14041b; display: flex; flex-direction: column; }
.client-preview .cp-bar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: #fff; }
.client-preview iframe { flex: 1; border: 0; width: 100%; }
.versions .ver-list { display: grid; gap: 6px; margin-top: 12px; max-height: 60vh; overflow-y: auto; }
.versions .ver-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.versions .ver-row div { display: grid; gap: 2px; }
.person-edit .pe-photo { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.person-prev { width: 84px; height: 84px; border-radius: 50%; overflow: hidden; background: #f3ebf8; display: grid; place-items: center; }
.person-prev img { width: 100%; height: 100%; object-fit: cover; }
.toast .toast-act { margin-inline-start: 8px; border: 0; background: #ffd000; color: #330541; font: inherit; font-weight: 800; padding: 4px 10px; border-radius: 99px; cursor: pointer; }
.toast .toast-x { border: 0; background: none; color: inherit; cursor: pointer; margin-inline-start: 4px; }


/* ---- photo focus (team / influencers) ---- */
.focus-box { display: grid; justify-items: center; gap: 10px; }
.focus-frame { width: 200px; height: 200px; border-radius: 50%; overflow: hidden; cursor: grab; touch-action: none; box-shadow: 0 0 0 4px #fff, 0 0 0 6px #e4d8ea; background: #f3eef6; }
.focus-frame:active { cursor: grabbing; }
.focus-frame img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; user-select: none; }
.focus-zoom { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.person-prev .focus-frame { width: 150px; height: 150px; }
.person .link-btn.sm { font-size: 12px; }

/* ---- several slides picked in the list ---- */
.slide-item.picked { outline: 2px solid #ec2979; outline-offset: -2px; background: #fdeef4; }
.pick-bar { margin: 6px 8px; padding: 8px 10px; border-radius: 12px; background: #330541; color: #fff; display: grid; gap: 6px; }
.pick-bar small { color: #e9dcef; }
.pick-acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pick-acts .btn.sm { padding: 4px 10px; }
.pick-acts .link-btn { color: #ffd000; }
.pick-sec { border-radius: 8px; padding: 4px 6px; font: inherit; font-size: 12px; }

/* ---- colors picked lately + eyedropper ---- */
.cv-recent { margin-top: 8px; display: grid; gap: 4px; }
.cv-custom-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }

/* ---- arranging the library by dragging ---- */
.lib-card[draggable="true"] { cursor: grab; }
.lib-card.dragging { opacity: .45; }
.lib-card.drop-before { box-shadow: inset -5px 0 0 #ec2979, 0 0 0 2px #ec2979; }
[dir="ltr"] .lib-card.drop-before { box-shadow: inset 5px 0 0 #ec2979, 0 0 0 2px #ec2979; }
.lib-grid.drop-end { outline: 2px dashed #ec2979; outline-offset: 6px; border-radius: 14px; }

/* ---- tender outcomes ---- */
.pill.outcome-won { background: #e6f6ec; color: #11683a; margin-inline-start: 6px; }
.pill.outcome-lost { background: #fbe9ec; color: #9b1c33; margin-inline-start: 6px; }
.pill.outcome-cancelled { background: #eee; color: #555; margin-inline-start: 6px; }
.outcome-seg { display: flex; gap: 6px; flex-wrap: wrap; }
.wins h3 { font-size: 15px; margin: 14px 0 4px; }
.win-reasons p { margin: 6px 0; line-height: 1.5; }

/* ---- Michi reviews the deck ---- */
.rv { display: grid; gap: 10px; }
.rv-tools { display: flex; justify-content: flex-start; }
.rv-sum { display: flex; gap: 14px; align-items: baseline; padding: 8px 12px; border-radius: 12px; background: #f6f0f9; }
.rv-list { display: grid; gap: 10px; max-height: 64vh; overflow: auto; padding-inline-end: 4px; }
.rv-slide { display: grid; grid-template-columns: 200px 1fr; gap: 14px; padding: 10px; border: 1px solid #ece4f0; border-radius: 14px; background: #fff; }
.rv-thumb { width: 200px; aspect-ratio: 16 / 9; border: 0; padding: 0; border-radius: 8px; overflow: hidden; cursor: pointer; background: #330541; }
.rv-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.rv-score { font-weight: 800; padding: 2px 10px; border-radius: 999px; font-size: 13px; }
.rv-score.good { background: #e6f6ec; color: #11683a; } .rv-score.ok { background: #fff4d6; color: #8a5a00; } .rv-score.bad { background: #fbe9ec; color: #9b1c33; } .rv-score.wait { color: #999; }
.rv-summary { margin: 4px 0; color: #6b5a72; font-size: 14px; }
.rv-issues { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.rv-issues li { display: grid; gap: 4px; font-size: 14px; }
.rv-issues li.done span { text-decoration: line-through; opacity: .6; }
.rv-issues .btn.sm { justify-self: start; }
.rv-new { white-space: pre-line; background: #f6f0f9; border-inline-start: 3px solid #ec2979; padding: 6px 10px; border-radius: 8px; font-size: 13px; }
@media (max-width: 700px) { .rv-slide { grid-template-columns: 1fr; } .rv-thumb { width: 100%; } }

/* quick free slide next to "+ add slide" */
.side-add:has(.quick-free) { flex-direction: row; }
.side-add .quick-free { flex: none; width: 44px; padding: 0; font-size: 18px; }

/* ---- tender vault ---- */
.vault { display: grid; gap: 14px; }
.vault-sigs { display: flex; flex-wrap: wrap; gap: 12px; margin: 8px 0; }
.vault-sig { width: 180px; display: grid; gap: 4px; padding: 10px; border: 1px solid #ece4f0; border-radius: 12px; background: #fff; }
.vault-sig-img { height: 90px; display: grid; place-items: center; background: repeating-conic-gradient(#f4f0f7 0 25%, #fff 0 50%) 0 0 / 14px 14px; border-radius: 8px; }
.vault-sig-img img { max-width: 100%; max-height: 90px; }
.vault-docs { display: grid; gap: 6px; margin: 8px 0; }
.vault-doc { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid #ece4f0; border-radius: 10px; background: #fff; flex-wrap: wrap; }

.tender-nav { margin-bottom: 12px; }
.tender-list { display: grid; gap: 8px; margin-top: 10px; }
.tender-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border: 1px solid #ece4f0; border-radius: 14px; background: #fff; cursor: pointer; }
.tender-row:hover { border-color: #ec2979; }
.tender-main { display: grid; flex: 1 1 220px; }
.pill.tender-ok { background: #e6f6ec; color: #11683a; } .pill.tender-bad { background: #fbe9ec; color: #9b1c33; } .pill.tender-muted { background: #eee; color: #666; }

/* ---- visual tender form filling ---- */
body.fill-open { overflow: hidden; }
.fill-wrap { position: fixed; inset: 0; z-index: 200; background: #efe9f3; display: flex; flex-direction: column; }
.fill-head { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: #fff; border-bottom: 1px solid #e4d8ea; }
.fill-body { flex: 1; display: grid; grid-template-columns: 300px 1fr; min-height: 0; }
.fill-side { overflow: auto; padding: 14px; background: #fff; border-inline-end: 1px solid #e4d8ea; display: grid; gap: 8px; align-content: start; }
.fill-side h4 { margin: 10px 0 2px; font-size: 14px; }
.fill-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid #d9cce0; background: #faf6fc; border-radius: 999px; padding: 4px 10px; font: inherit; font-size: 13px; cursor: pointer; }
.chip:hover, .chip.on { background: #ec2979; border-color: #ec2979; color: #fff; }
.chip.img { border-radius: 12px; display: grid; justify-items: center; gap: 2px; padding: 6px 8px; }
.chip.img img { max-width: 110px; max-height: 44px; }
.fill-sel { display: grid; gap: 8px; padding: 10px; border-radius: 12px; background: #f6f0f9; }
.fill-pages { overflow: auto; padding: 18px; display: grid; gap: 18px; justify-items: center; align-content: start; }
.fill-page { position: relative; width: 860px; max-width: 100%; background: #fff; box-shadow: 0 4px 18px rgb(51 5 65 / .18); }
.fill-page.lawyer { outline: 3px dashed #f39a2e; }
.fill-page canvas { display: block; width: 100%; }
.fill-layer { position: absolute; inset: 0; }
.fill-wrap.placing .fill-layer { cursor: crosshair; }
.fill-num { position: absolute; top: -14px; inset-inline-start: 0; font-size: 11px; color: #6b5a72; }
.fill-lawyer { position: absolute; top: 6px; inset-inline-end: 6px; font-size: 12px; background: #fff8; padding: 2px 8px; border-radius: 999px; }
.fill-item { position: absolute; line-height: 1.15; color: #0a0a2e; border: 1px dashed transparent; cursor: move; touch-action: none; user-select: none; white-space: pre-wrap; }
.fill-item:hover, .fill-item.on { border-color: #ec2979; background: #ec297912; }
.fill-item.img img { width: 100%; display: block; pointer-events: none; }
.fill-grip { position: absolute; bottom: -5px; inset-inline-start: -5px; width: 10px; height: 10px; border-radius: 50%; background: #ec2979; cursor: ew-resize; display: none; }
.fill-item.on .fill-grip { display: block; }
@media (max-width: 900px) { .fill-body { grid-template-columns: 1fr; grid-template-rows: auto 1fr; } .fill-side { max-height: 36vh; } }

/* ---- form filling v2: exact text boxes, ghost preview, history ---- */
.fill-item.txt { width: max-content; white-space: nowrap; line-height: 1; font-family: FillHe, FillLat, 'Assistant', sans-serif; z-index: 3; padding: 0; }
.fill-item.img { z-index: 2; }
.fill-item.txt .fill-grip { display: none !important; }
.fill-ghost { position: absolute; z-index: 6; pointer-events: none; opacity: .5; }
.fill-ghost.txt { white-space: nowrap; line-height: 1; font-family: FillHe, FillLat, 'Assistant', sans-serif; color: #0a0a2e; background: #ec297922; outline: 1px dashed #ec2979; }
.fill-ghost.img img { width: 100%; display: block; }
.fill-ghost.blocked { outline: 2px solid #c0152f; }
.fill-wrap:focus { outline: none; }
.fill-undo { display: flex; gap: 6px; }
.fill-placed { display: grid; gap: 2px; max-height: 220px; overflow: auto; }
.placed-row { text-align: start; border: 0; background: transparent; padding: 3px 6px; border-radius: 8px; font: inherit; font-size: 13px; cursor: pointer; }
.placed-row:hover, .placed-row.on { background: #f6f0f9; }
.version-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid #f0e8f4; }
.fill-item.txt { border: 0; }
.fill-item.txt:hover, .fill-item.txt.on { outline: 1px dashed #ec2979; background: #ec297912; }

/* ---- tender eligibility report ---- */
.chk { display: grid; gap: 12px; max-height: 70vh; overflow: auto; padding-inline-end: 4px; }
.chk h4 { margin: 0 0 6px; font-size: 15px; }
.chk-box { padding: 12px 14px; border: 1px solid #ece4f0; border-radius: 12px; background: #fff; }
.chk-box.warn { background: #fff8e8; border-color: #f3d58a; }
.chk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.chk-list { margin: 4px 0; padding-inline-start: 18px; display: grid; gap: 3px; }
.chk-verdict { padding: 14px 16px; border-radius: 14px; background: #f6f0f9; }
.chk-verdict.ok { background: #e6f6ec; } .chk-verdict.warn { background: #fff4d6; } .chk-verdict.bad { background: #fbe9ec; }
.chk-verdict > b { font-size: 18px; }
.chk-conds { display: grid; gap: 8px; }
.chk-cond { padding: 8px 10px; border-radius: 10px; border: 1px solid #ece4f0; border-inline-start: 4px solid #cbbfd3; }
.chk-cond.met { border-inline-start-color: #1c9a58; } .chk-cond.not_met { border-inline-start-color: #c0152f; } .chk-cond.needs_action { border-inline-start-color: #f39a2e; }
.chk-cond-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.chk-ev, .chk-act { margin: 4px 0 0; font-size: 13px; color: #53405c; }
.chk-act { color: #8a5a00; }
.chk-table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 6px 0; }
.chk-table th, .chk-table td { text-align: start; padding: 4px 8px; border-bottom: 1px solid #f0e8f4; }
.tender-check { padding: 10px 12px; border-radius: 12px; background: #f6f0f9; }
.tender-check h3 { margin: 0 0 6px; }
@media (max-width: 700px) { .chk-grid { grid-template-columns: 1fr; } }

/* fill: visible delete buttons (the ✕ is out of the text flow so the box stays exactly the text size) */
.fill-item .fill-x{position:absolute;top:-11px;inset-inline-start:-11px;width:20px;height:20px;border-radius:50%;background:#d33;color:#fff;font-style:normal;font-size:11px;line-height:20px;text-align:center;cursor:pointer;box-shadow:0 1px 4px rgba(0,0,0,.35);z-index:3}
.placed-row{display:flex;align-items:center;gap:6px}
.placed-row .placed-x{margin-inline-start:auto;color:#d33;padding:0 6px;border-radius:6px;cursor:pointer}
.placed-row .placed-x:hover{background:rgba(220,50,50,.12)}

/* dialogs and messages must show above the full-screen form filler (it sits at z-index 200) */
.modal-wrap{z-index:300}
.toast{z-index:400}
.fill-marquee{position:absolute;border:1px solid #7b2cbf;background:rgba(123,44,191,.12);pointer-events:none;z-index:4}

/* loading screen: the 42 wordmark, Michi pulling faces, rotating tender one-liners */
.michi-load{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;text-align:center;color:#fff;background:#330541;border-radius:22px;padding:42px 24px;margin:40px auto;max-width:640px}
.michi-load.full{position:fixed;inset:0;z-index:1000;border-radius:0;margin:0;max-width:none}
.ml-42{height:30px;width:auto;opacity:.95}
.ml-michi{width:132px;height:132px;overflow:visible;animation:ml-bob 2.4s ease-in-out infinite}
.ml-name{font-weight:800;font-size:20px;letter-spacing:.2px}
.ml-quip{min-height:2.6em;max-width:30em;font-size:16px;line-height:1.5;color:#ffd000;opacity:0;transform:translateY(6px);transition:opacity .25s,transform .25s}
.ml-quip.in{opacity:1;transform:none}
.ml-michi g,.ml-michi path,.ml-michi ellipse{transform-box:fill-box;transform-origin:center}
.ml-eyeR{animation:ml-wink 6s infinite}
.ml-eyeL{animation:ml-blink 6s infinite}
.ml-brow{animation:ml-brow 6s infinite}
.ml-smile{animation:ml-m-smile 6s infinite}
.ml-oh{opacity:0;animation:ml-m-oh 6s infinite}
.ml-tongue{opacity:0;animation:ml-m-tongue 6s infinite}
@keyframes ml-bob{0%,100%{transform:translateY(0) rotate(-2deg)}50%{transform:translateY(-7px) rotate(2deg)}}
@keyframes ml-wink{0%,14%,28%,100%{transform:scaleY(1)}18%,24%{transform:scaleY(.08)}62%,78%{transform:translateX(-4px) scale(1.15)}}
@keyframes ml-blink{0%,52%,58%,100%{transform:scaleY(1)}55%{transform:scaleY(.08)}62%,78%{transform:translateX(4px) scale(1.15)}}
@keyframes ml-brow{0%,34%,50%,100%{transform:translateY(0)}38%,46%{transform:translateY(-3px)}}
@keyframes ml-m-smile{0%,34%,80%,100%{opacity:1}35%,79%{opacity:0}}
@keyframes ml-m-oh{0%,34%,50%,100%{opacity:0}36%,48%{opacity:1}}
@keyframes ml-m-tongue{0%,50%,79%,100%{opacity:0}52%,76%{opacity:1}}
@media (prefers-reduced-motion:reduce){.ml-michi,.ml-michi *{animation:none!important}}

/* bigger app screens: the top bar, the pages and the dialogs around the decks (the deck builder, the studio and the slides themselves keep their size) */
:root { --nz: 1.16; --pz: 1.12; }
.topnav { zoom: var(--nz); }
.page:not(.page-full) { zoom: var(--pz); }
body:not(.in-deck) .modal-wrap .modal:not(:has(.cv-wrap)) { zoom: var(--pz); }

/* access code in the send-to-client dialog */
.code-toggle { display: flex; align-items: center; gap: 10px; margin: 12px 0 6px; font-weight: 600; cursor: pointer; flex-wrap: wrap; }
.code-toggle input { width: 18px; height: 18px; }
.code-box { margin-bottom: 10px; }
.code-in { font-size: 20px; letter-spacing: .2em; text-align: center; text-transform: uppercase; font-weight: 700; max-width: 220px; }
