/* ---------- Editor de slides ---------- */
.ed { position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; background: #eceef7; color: #1d2130; font: 14px/1.4 Inter, system-ui, sans-serif; }
.ed .hidden { display: none !important; }
.ed .ic { width: 18px; height: 18px; }

/* barra superior */
.ed-top { display: flex; align-items: center; gap: 10px; padding: 0 16px; height: 62px; flex: none; background: #fff; border-bottom: 1px solid #e3e6ef; box-shadow: 0 1px 8px rgba(30, 30, 70, .05); position: relative; z-index: 3; }
.ed-top .sp { flex: 1; }
.tb-sep { width: 1px; height: 26px; background: #e3e6ef; margin: 0 4px; }
.tb-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border: 1px solid #e3e6ef; background: #fff; border-radius: 11px; cursor: pointer; font: inherit; font-weight: 600; color: #333a55; transition: .15s; }
.tb-btn:hover { background: #f4f5fb; border-color: #cfd3e3; }
.tb-btn.primary { background: linear-gradient(135deg, #6c5ce7, #a855f7); border-color: transparent; color: #fff; box-shadow: 0 4px 14px rgba(108, 92, 231, .35); } .tb-btn.primary:hover { filter: brightness(1.08); }
.tb-ico { width: 40px; height: 40px; display: grid; place-items: center; border: 0; background: transparent; border-radius: 11px; cursor: pointer; color: #555c75; } .tb-ico:hover { background: #eef0f8; color: #6c5ce7; }
.ed-name { width: 260px; height: 40px; font-weight: 700; font-size: 15px; border: 2px solid transparent; background: transparent; border-radius: 10px; padding: 0 10px; }
.ed-name:hover { background: #f4f5fb; } .ed-name:focus { background: #fff; border-color: #6c5ce7; outline: 0; }
.ed-state { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #7b8196; white-space: nowrap; }
.ed-state i { width: 8px; height: 8px; border-radius: 50%; } .ed-state i.st-ok { background: #16a34a; } .ed-state i.st-warn { background: #f59e0b; }
.ed-dur { display: flex; align-items: center; gap: 8px; margin: 0; padding: 0 12px; height: 40px; background: #f4f5fb; border-radius: 11px; color: #667; font-weight: 600; font-size: 13px; white-space: nowrap; }
.ed-dur input { width: 46px; height: 28px; padding: 0 6px; text-align: center; border-radius: 8px; font-weight: 700; } .ed-dur i { font-style: normal; }

/* corpo em 3 colunas */
.ed-body { flex: 1; display: grid; grid-template-columns: 290px minmax(0, 1fr) 310px; min-height: 0; }
.ed-left, .ed-right { background: #fff; display: flex; flex-direction: column; min-height: 0; }
.ed-left { border-right: 1px solid #e3e6ef; } .ed-right { border-left: 1px solid #e3e6ef; }
.ed-tabs { display: flex; gap: 4px; padding: 10px; border-bottom: 1px solid #eef0f7; flex: none; }
.ed-tabs button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; border: 0; background: transparent; border-radius: 10px; cursor: pointer; font: inherit; font-weight: 600; font-size: 13px; color: #6b7390; transition: .15s; }
.ed-tabs button:hover { background: #f4f5fb; } .ed-tabs button.on { background: #efecff; color: #6c5ce7; } .ed-tabs .ic { width: 16px; height: 16px; }
.ed-tabs-title { padding: 8px 6px; font-weight: 800; font-size: 14px; }
.ed-pbody { flex: 1; overflow-y: auto; padding: 6px 16px 24px; }

/* grupos e campos */
.grp { padding: 12px 0 14px; border-bottom: 1px solid #f0f1f8; } .grp:last-child { border: 0; }
.grp h5 { margin: 0 0 10px; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: #8a90a6; font-weight: 800; } .grp h5 small { text-transform: none; letter-spacing: 0; font-weight: 500; margin-left: 6px; }
.ed .f { display: flex; flex-direction: column; gap: 5px; margin: 0 0 10px; min-width: 0; }
.ed .f > span { font-size: 12px; font-weight: 600; color: #6b7390; display: flex; justify-content: space-between; align-items: center; }
.ed .f output { color: #6c5ce7; font-weight: 700; }
.ed .f input, .ed .f select, .ed textarea { height: 38px; border-radius: 10px; font-size: 13px; background: #f6f7fc; border: 1px solid transparent; padding: 0 10px; }
.ed .f input:focus, .ed .f select:focus, .ed textarea:focus { background: #fff; border-color: #6c5ce7; outline: 0; box-shadow: 0 0 0 3px #e6e3ff; }
.ed textarea { height: auto; padding: 10px; width: 100%; resize: vertical; font-family: inherit; margin-bottom: 10px; line-height: 1.4; }
.ed .f input[type=range] { padding: 0; height: 20px; accent-color: #6c5ce7; background: transparent; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: start; } .grid2 > .seg { margin-bottom: 10px; }
.gap { height: 12px; }
.clr { display: flex; gap: 8px; align-items: center; }
.clr input[type=color] { -webkit-appearance: none; appearance: none; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 10px; cursor: pointer; flex: none; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .12); background: none; }
.clr input[type=color]::-webkit-color-swatch-wrapper { padding: 0; } .clr input[type=color]::-webkit-color-swatch { border: 0; border-radius: 10px; }
.clr input[data-hex] { flex: 1; min-width: 0; font: 600 12px ui-monospace, Consolas, monospace; text-transform: uppercase; }
.chks { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; } .ed .chk { display: flex; align-items: center; gap: 9px; margin: 0 0 8px; color: #333a55; font-size: 13px; font-weight: 500; cursor: pointer; }
.chk input { position: absolute; opacity: 0; width: 0; height: 0; }
.chk .sw-t { width: 34px; height: 20px; border-radius: 99px; background: #d9dcea; position: relative; flex: none; transition: .2s; }
.chk .sw-t::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: .2s; }
.chk input:checked + .sw-t { background: #6c5ce7; } .chk input:checked + .sw-t::after { transform: translateX(14px); }
.seg { display: flex; background: #f1f2f9; border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { flex: 1; height: 32px; border: 0; background: transparent; border-radius: 8px; cursor: pointer; font: inherit; font-weight: 600; font-size: 13px; color: #6b7390; } .seg button:hover { color: #6c5ce7; } .seg button.on { background: #fff; color: #6c5ce7; box-shadow: 0 1px 4px rgba(30, 30, 70, .12); }
.sw { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 6px; } .sw button { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #d6d9e6; cursor: pointer; transition: .15s; } .sw button:hover { transform: scale(1.15); }
.chipsel { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.chipsel button { padding: 7px 12px; border: 1px solid #e3e6ef; background: #fff; border-radius: 99px; cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 600; color: #555c75; transition: .15s; }
.chipsel button:hover { border-color: #b9aff7; color: #6c5ce7; } .chipsel button.on { background: #6c5ce7; border-color: #6c5ce7; color: #fff; }
.ed .btn.wide { width: 100%; justify-content: center; }

/* esquerda: adicionar */
.addtxt { display: block; width: 100%; text-align: left; margin-bottom: 8px; padding: 12px 14px; border: 1px solid #e8eaf4; background: #f8f9fd; border-radius: 12px; cursor: pointer; color: #1d2130; transition: .15s; font-family: Poppins, Inter, sans-serif; }
.addtxt:hover { border-color: #6c5ce7; background: #f3f0ff; transform: translateX(3px); }
.addtxt.t1 { font-size: 24px; font-weight: 800; } .addtxt.t2 { font-size: 17px; font-weight: 600; } .addtxt.t3 { font-size: 13px; font-weight: 400; }
.shapes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; } .shapes button { height: 56px; border: 1px solid #e8eaf4; background: #f8f9fd; border-radius: 12px; cursor: pointer; color: #555c75; display: grid; place-items: center; transition: .15s; }
.shapes button:hover { border-color: #6c5ce7; color: #6c5ce7; background: #f3f0ff; } .shapes .ic { width: 26px; height: 26px; }
.addimg { width: 100%; padding: 22px 12px; border: 2px dashed #cfc9f5; background: #faf9ff; border-radius: 14px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; color: #6c5ce7; font: inherit; transition: .15s; }
.addimg:hover { background: #f1eeff; border-color: #6c5ce7; } .addimg .ic { width: 28px; height: 28px; } .addimg b { color: #1d2130; font-size: 13.5px; } .addimg small { color: #8a90a6; }
.imgpick { height: 120px; border: 2px dashed #cfd3e3; border-radius: 14px; display: flex; flex-direction: column; gap: 6px; align-items: center; justify-content: center; text-align: center; color: #8a90a6; cursor: pointer; background: #faf9ff center/cover; margin-bottom: 8px; } .imgpick .ic { width: 26px; height: 26px; }

/* camadas */
.layer { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 10px; cursor: pointer; border: 1px solid transparent; margin-bottom: 4px; }
.layer:hover { background: #f4f5fb; } .layer.on { background: #efecff; border-color: #d4cdff; }
.layer .li { width: 28px; height: 28px; border-radius: 8px; background: #f1f2f9; color: #6c5ce7; display: grid; place-items: center; flex: none; } .layer .li .ic { width: 15px; height: 15px; }
.layer .ln { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.layer button { border: 0; background: transparent; cursor: pointer; color: #a0a6bd; padding: 3px; border-radius: 6px; display: grid; place-items: center; } .layer button:hover { color: #6c5ce7; background: #fff; } .layer button .ic { width: 15px; height: 15px; }
.ed .muted { color: #8a90a6; font-size: 12.5px; }

/* direita: estado vazio */
.ed-hint { text-align: center; padding: 28px 8px; color: #6b7390; }
.ed-hint > .ic { width: 38px; height: 38px; color: #b4abf5; margin-bottom: 6px; } .ed-hint b { display: block; color: #1d2130; font-size: 15px; } .ed-hint p { margin: 6px 0 14px; }
.ed-hint ul { text-align: left; list-style: none; padding: 12px 14px; margin: 0 0 16px; background: #f6f7fc; border-radius: 12px; font-size: 13px; display: grid; gap: 6px; }

/* centro */
.ed-center { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #e9ebf5; }
.ed-stagebox { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; padding: 12px; }
.ed-canvas { position: relative; box-shadow: 0 2px 4px rgba(20, 20, 60, .08), 0 24px 70px rgba(20, 20, 60, .28); background: #000; touch-action: none; border-radius: 4px; }
.ed-canvas .dn-el { cursor: move; }
.ed-bar { position: absolute; top: 14px; left: 50%; transform: translate(-50%, -8px); display: flex; align-items: center; gap: 2px; padding: 5px; background: #fff; border-radius: 14px; box-shadow: 0 8px 30px rgba(30, 30, 70, .2); opacity: 0; pointer-events: none; transition: .18s; z-index: 4; }
.ed-bar.show { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
.ed-bar button { width: 38px; height: 38px; display: grid; place-items: center; border: 0; background: transparent; border-radius: 10px; cursor: pointer; color: #555c75; } .ed-bar button:hover { background: #efecff; color: #6c5ce7; } .ed-bar button.danger:hover { background: #fee2e2; color: #dc2626; }
.ed-bar i { width: 1px; height: 22px; background: #e3e6ef; margin: 0 4px; }
.ed-info { flex: none; text-align: center; padding: 0 0 10px; font-size: 12px; color: #8a90a6; }
.ed-sel { position: absolute; border: 2px solid #6c5ce7; pointer-events: none; box-sizing: border-box; }
.ed-sel .h { position: absolute; background: #fff; border: 2px solid #6c5ce7; border-radius: 50%; pointer-events: auto; box-sizing: border-box; }
.ed-sel .h-nw, .ed-sel .h-se { cursor: nwse-resize; } .ed-sel .h-ne, .ed-sel .h-sw { cursor: nesw-resize; }
.ed-sel .h-n, .ed-sel .h-s { cursor: ns-resize; } .ed-sel .h-e, .ed-sel .h-w { cursor: ew-resize; }
.ed-sel .h.rot { cursor: grab; background: #6c5ce7; }
.guide { position: absolute; background: #ff3d81; display: none; pointer-events: none; }
.guide.gv { left: 50%; top: 0; bottom: 0; width: 2px; } .guide.gh { top: 50%; left: 0; right: 0; height: 2px; }

/* prévia animada */
.ed-preview { position: absolute; inset: 0; z-index: 6; background: rgba(10, 12, 24, .94); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; }
.ed-prev-bar { display: flex; gap: 10px; } .ed-prev-bar .tb-btn { background: rgba(255, 255, 255, .12); border-color: transparent; color: #fff; } .ed-prev-bar .tb-btn:hover { background: rgba(255, 255, 255, .22); }
.ed-prev-host { position: relative; box-shadow: 0 20px 80px rgba(0, 0, 0, .6); border-radius: 6px; overflow: hidden; }

@media (max-width: 1100px) { .ed-body { grid-template-columns: 240px minmax(0, 1fr) 270px; } .ed-name { width: 160px; } .tb-btn span { display: none; } .tb-btn { padding: 0 11px; } }
@media (max-width: 800px) { .ed-body { grid-template-columns: 1fr; grid-template-rows: 1fr auto; } .ed-left { display: none; } .ed-right { max-height: 42vh; } }

.ed-hint ul b { display: inline; font-size: inherit; }
.ed .f input::placeholder { color: #b3b8cc; }

.ed-stagebox { overflow: hidden; }

@media (max-width: 1100px) { .ed-tabs { padding: 8px 6px; gap: 2px; } .ed-tabs button { font-size: 12px; gap: 4px; padding: 0 4px; } .ed-tabs .ic { width: 14px; height: 14px; } }
