:root{--yellow:#ffcc00;--dark:#333e48;--deep:#252f37;--line:#dfe4e8;--soft:#f5f7f8;--text:#24313b;--muted:#6c7882;--danger:#b42318;--white:#fff;--shadow:0 12px 35px rgba(29,40,50,.08)}*{box-sizing:border-box}body{margin:0;font-family:Arial,Helvetica,sans-serif;color:var(--text);background:#eef2f4}button,input,textarea,select{font:inherit}.auth-page{min-height:100vh;display:grid;place-items:center;padding:24px;background:linear-gradient(135deg,#252f37,#333e48)}.auth-card{width:min(460px,100%);padding:34px;border-radius:22px;background:#fff;box-shadow:0 25px 70px rgba(0,0,0,.25)}.auth-brand{display:inline-block;margin-bottom:18px;padding:8px 12px;border-radius:9px;background:var(--yellow);font-weight:900;letter-spacing:.08em}.auth-card h1{margin:0 0 8px}.auth-card p{margin:0 0 22px;color:var(--muted);line-height:1.55}.auth-card form{display:grid;gap:16px}.auth-card label,.form-column label{display:grid;gap:7px;font-size:13px;font-weight:700;color:#44515b}.auth-card input,.form-column input,.form-column textarea,.form-column select{width:100%;padding:11px 12px;border:1px solid #cfd7dc;border-radius:10px;background:#fff;color:#1f2b33;outline:none}.auth-card input:focus,.form-column input:focus,.form-column textarea:focus,.form-column select:focus{border-color:#9f8200;box-shadow:0 0 0 3px rgba(255,204,0,.18)}.notice{margin-bottom:18px;padding:12px 14px;border-radius:10px;font-size:13px}.notice.error{background:#fef3f2;color:#b42318}.notice.success{background:#ecfdf3;color:#067647}.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:40px;padding:9px 14px;border:1px solid #cfd7dc;border-radius:10px;background:#fff;color:#27343d;font-weight:800;cursor:pointer;text-decoration:none}.btn:hover{background:#f7f9fa}.btn.primary{border-color:var(--yellow);background:var(--yellow);color:#232b31}.btn.danger{border-color:#f2c7c4;color:var(--danger);background:#fff}.btn.ghost{background:transparent}.btn.small{min-height:34px;padding:7px 10px;font-size:12px}.topbar{position:sticky;top:0;z-index:50;display:flex;align-items:center;justify-content:space-between;padding:12px 18px;background:#252f37;color:#fff;box-shadow:0 5px 20px rgba(0,0,0,.12)}.topbar>div:first-child{display:flex;align-items:center;gap:10px}.topbar strong{color:var(--yellow);letter-spacing:.08em}.topbar span{font-size:13px;color:#cdd5da}.topbar-actions{display:flex;align-items:center;gap:12px}.status{font-size:12px!important}.workspace{display:grid;grid-template-columns:290px minmax(0,1fr);gap:16px;max-width:1800px;margin:0 auto;padding:16px}.panel{background:#fff;border:1px solid #e1e6e9;border-radius:16px;box-shadow:var(--shadow)}.sidebar{position:sticky;top:74px;align-self:start;max-height:calc(100vh - 90px);overflow:auto;padding:15px}.editor{min-width:0;padding:18px}.panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.panel-head h2,.panel-head h3{margin:0 0 3px}.panel-head p{margin:0;color:var(--muted);font-size:12px}.panel-head.compact{align-items:center}.slide-list{display:grid;gap:8px;margin:16px 0}.slide-item{display:flex;align-items:center;gap:10px;padding:11px;border:1px solid #dde3e7;border-radius:11px;background:#fff;cursor:pointer}.slide-item.active{border-color:#d2ad00;background:#fff9d7}.slide-item.dragging{opacity:.45}.drag-handle{color:#8a969f;cursor:grab}.slide-copy{min-width:0;flex:1}.slide-copy strong,.slide-copy small{display:block}.slide-copy strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}.slide-copy small{margin-top:3px;color:var(--muted);font-size:11px}.pill{padding:3px 7px;border-radius:999px;background:#edf1f3;color:#53616b;font-size:10px;font-weight:800}.pill.on{background:#eaf8ef;color:#087a3d}.sidebar-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.sidebar hr{margin:18px 0;border:0;border-top:1px solid #e5e9ec}.backup-list{display:grid;gap:7px;margin-top:12px}.backup-item{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:9px;border-radius:9px;background:#f6f8f9;font-size:11px}.backup-item button{padding:5px 8px;border:0;border-radius:7px;background:#fff;cursor:pointer;font-weight:800}.editor-title{margin-bottom:18px}.publish-actions{display:flex;gap:8px}.editor-grid{display:grid;grid-template-columns:minmax(430px,680px) minmax(420px,1fr);gap:18px;align-items:start}.form-column{display:grid;gap:13px}.form-column fieldset{margin:0;padding:15px;border:1px solid #dfe5e8;border-radius:13px}.form-column legend{padding:0 7px;font-size:13px;font-weight:900;color:#2f3c45}.form-column label{margin-top:10px}.form-column fieldset>label:first-of-type{margin-top:0}.field-row{display:grid;gap:10px}.field-row.two{grid-template-columns:1fr 1fr}.field-row.three{grid-template-columns:repeat(3,1fr)}input[type=color]{height:44px;padding:4px!important}.switch-label{display:flex!important;align-items:center!important;justify-content:space-between;grid-template-columns:none!important;gap:12px!important}.switch-label input{position:absolute;opacity:0;pointer-events:none}.switch{position:relative;display:block;width:44px;height:24px;flex:0 0 44px;border-radius:999px;background:#cbd4da;transition:.2s}.switch:after{position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;background:#fff;content:"";transition:.2s;box-shadow:0 1px 4px rgba(0,0,0,.2)}.switch-label input:checked+.switch{background:#d6ad00}.switch-label input:checked+.switch:after{transform:translateX(20px)}.upload-row{display:grid;grid-template-columns:1fr auto;gap:8px;margin-top:10px}.upload-row input{padding:8px!important}.help{display:block;margin-top:7px;color:var(--muted)}.button-config+.button-config,.card-config+.card-config{margin-top:14px;padding-top:14px;border-top:1px solid #edf0f2}.preview-column{position:sticky;top:74px;min-width:0}.preview-toolbar{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.preview-toolbar>div{display:flex;gap:6px}.device-btn{padding:7px 10px;border:1px solid #d5dde2;border-radius:8px;background:#fff;cursor:pointer;font-size:12px;font-weight:800}.device-btn.active{border-color:#d4ad00;background:#fff9d1}.preview-stage{display:flex;justify-content:center;min-height:620px;padding:14px;overflow:auto;border:1px solid #dfe5e8;border-radius:14px;background:#e9eef1}.preview-stage iframe{width:100%;height:650px;border:0;border-radius:12px;background:#fff;box-shadow:0 12px 32px rgba(0,0,0,.12);transition:width .2s}.preview-stage iframe.mobile{width:390px;height:820px}.schedule-note{margin-top:10px;padding:10px 12px;border-radius:9px;background:#f6f8f9;color:#64727c;font-size:12px}.backup-box h3{font-size:14px}@media(max-width:1200px){.workspace{grid-template-columns:240px minmax(0,1fr)}.editor-grid{grid-template-columns:1fr}.preview-column{position:static}.preview-stage{min-height:520px}}@media(max-width:800px){.workspace{grid-template-columns:1fr}.sidebar{position:static;max-height:none}.field-row.two,.field-row.three{grid-template-columns:1fr}.editor-title{display:grid}.publish-actions{width:100%}.publish-actions .btn{flex:1}.topbar span:not(.status){display:none}}

/* ==========================================================
   v1.1 — Estado de publicação e preview WYSIWYG
   ========================================================== */
.editor-head-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}.publication-state{display:inline-flex;align-items:center;gap:7px;min-height:34px;padding:7px 10px;border:1px solid #d8e0e4;border-radius:999px;background:#f6f8f9;color:#596771;font-size:11px;font-weight:800;white-space:nowrap}.publication-state-dot{width:8px;height:8px;border-radius:50%;background:#a5b0b7;box-shadow:0 0 0 3px rgba(165,176,183,.16)}.publication-state.is-published{border-color:#bfe6cc;background:#ecfdf3;color:#067647}.publication-state.is-published .publication-state-dot{background:#12a15b;box-shadow:0 0 0 3px rgba(18,161,91,.13)}.publication-state.is-draft{border-color:#f2d37a;background:#fff9e6;color:#745b00}.publication-state.is-draft .publication-state-dot{background:#d6ad00;box-shadow:0 0 0 3px rgba(214,173,0,.14)}.publication-state.is-dirty{border-color:#f0c8a8;background:#fff5ec;color:#9a4e10}.publication-state.is-dirty .publication-state-dot{background:#e07822;box-shadow:0 0 0 3px rgba(224,120,34,.13)}.publication-state.is-loading{color:#6c7882}.preview-stage{align-items:flex-start;min-height:0;overflow:hidden}.preview-stage iframe{display:block;width:100%;height:360px;min-height:0;overflow:hidden}.preview-stage iframe.mobile{width:390px;max-width:100%;height:820px}.preview-mode-note{display:none}@media(max-width:1200px){.editor-head-actions{justify-content:flex-start}.publication-state{order:2}.publish-actions{order:1}}@media(max-width:800px){.editor-head-actions{width:100%;justify-content:stretch}.publication-state{width:100%;justify-content:center}.publish-actions{width:100%}}

/* ==========================================================
   v1.2 — Preview estável ao alternar Desktop / Mobile
   ========================================================== */
.preview-stage{
  display:block;
  overflow:hidden;
}
.preview-stage iframe,
.preview-stage iframe.mobile{
  display:block;
  width:100%;
  max-width:none;
  min-width:0;
  margin:0;
  border:0;
  opacity:0;
  transition:opacity 90ms ease;
}
.preview-stage iframe.preview-ready{
  opacity:1;
}
