@font-face{font-family:Madefor;src:url('./assets/madefor-text_f81052facf4e.woff2') format('woff2');font-weight:400;font-display:swap}
@font-face{font-family:Madefor;src:url('./assets/madefor-text-bold_d7ecf2f8ff3d.woff2') format('woff2');font-weight:700;font-display:swap}
@font-face{font-family:Madefor Display;src:url('./assets/madefor-display-bold_2efb43704c07.woff2') format('woff2');font-weight:700;font-display:swap}
:root{--bg:#f4f3ef;--surface:#fff;--ink:#1d1d24;--muted:#75747d;--line:#e5e3dc;--accent:#6558e8;--accent-dark:#4b3fd0;--accent-soft:#eeecff;--green:#2a956f;--amber:#d58b29;--shadow:0 16px 45px rgba(31,28,47,.08);--radius:14px}
*{box-sizing:border-box}html,body,#root{height:100%;margin:0}body{font-family:Madefor,Arial,sans-serif;color:var(--ink);background:var(--bg);overflow:hidden}button,input,textarea,select{font:inherit}button{color:inherit}.boot-screen{height:100%;display:grid;place-content:center;text-align:center;color:var(--muted);gap:14px}.brand-mark{margin:auto;width:44px;height:44px;border-radius:13px;background:var(--accent);display:grid;place-items:center;color:white;font:700 23px 'Madefor Display'}
.app-shell{height:100%;display:grid;grid-template-rows:64px 1fr}.topbar{background:rgba(255,255,255,.94);border-bottom:1px solid var(--line);display:flex;align-items:center;padding:0 20px;gap:20px;z-index:10}.brand{display:flex;align-items:center;gap:10px;min-width:208px}.brand-mark.sm{width:32px;height:32px;border-radius:10px;font-size:17px}.brand-name{font-family:'Madefor Display';font-size:16px;letter-spacing:-.02em}.project-identity{border-left:1px solid var(--line);padding-left:20px;display:flex;align-items:center;gap:10px}.project-name{font-size:14px;font-weight:700;max-width:260px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.save-state{font-size:11px;color:var(--green);display:flex;align-items:center;gap:6px}.save-state.saving{color:var(--amber)}.save-dot{width:6px;height:6px;border-radius:50%;background:currentColor}.top-actions{margin-left:auto;display:flex;align-items:center;gap:8px}.icon-btn,.ghost-btn,.primary-btn,.small-btn{border:0;background:none;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:7px;border-radius:9px;transition:.18s ease}.icon-btn{width:36px;height:36px;color:#65636c}.icon-btn:hover,.ghost-btn:hover{background:#f0efeb;color:#25242a}.icon-btn:disabled{opacity:.35;cursor:not-allowed}.ghost-btn,.primary-btn{height:38px;padding:0 14px;font-size:13px;font-weight:700}.ghost-btn{border:1px solid var(--line);background:white}.primary-btn{background:var(--ink);color:#fff}.primary-btn:hover{background:var(--accent)}.avatar{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:#e8d9c8;font-size:12px;font-weight:700;margin-left:4px}
.workspace{min-height:0;display:grid;grid-template-columns:76px 280px minmax(390px,1fr) minmax(430px,46vw)}.rail{background:#202027;color:#aaa8b2;padding:12px 8px;display:flex;flex-direction:column;align-items:stretch;gap:4px}.rail-item{border:0;background:transparent;color:inherit;border-radius:10px;min-height:57px;padding:7px 2px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;font-size:9px;cursor:pointer}.rail-item svg{width:19px;height:19px}.rail-item:hover{color:#fff;background:#2b2a32}.rail-item.active{background:#fff;color:#282631}.rail-spacer{flex:1}
.structure-panel,.editor-panel,.preview-panel{min-width:0;min-height:0}.structure-panel{background:#faf9f6;border-right:1px solid var(--line);display:flex;flex-direction:column}.panel-heading{height:57px;flex:0 0 57px;padding:0 18px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}.eyebrow{font-size:10px;letter-spacing:.13em;text-transform:uppercase;font-weight:700;color:#88868f}.panel-heading .icon-btn{width:30px;height:30px}.tree{overflow:auto;padding:12px 9px 18px;flex:1}.tree-item{display:flex;align-items:center;gap:8px;border-radius:8px;min-height:36px;padding:6px 9px;font-size:12px;cursor:pointer;color:#57555e;border:1px solid transparent}.tree-item:hover{background:#f1f0ec}.tree-item.selected{background:var(--accent-soft);border-color:#ddd8ff;color:#3d347e;font-weight:700}.tree-item.child{padding-left:29px}.tree-item.grandchild{padding-left:46px}.tree-label{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.status-indicator{width:7px;height:7px;border-radius:50%;background:#c8c6c1;box-shadow:0 0 0 3px #f2f1ed}.status-indicator.complete{background:var(--green)}.status-indicator.editing{background:var(--amber)}.chevron{display:grid;place-items:center;transition:.2s}.chevron.closed{transform:rotate(-90deg)}.add-section{margin:0 14px 14px;height:39px;border:1px dashed #c9c5d6;color:#5145c4;background:#f8f7ff;border-radius:10px;font-size:12px;font-weight:700;cursor:pointer}.add-section:hover{background:var(--accent-soft)}
.editor-panel{background:white;border-right:1px solid var(--line);display:flex;flex-direction:column}.editor-scroll{overflow:auto;padding:25px clamp(20px,3vw,46px) 60px}.editing-label{display:flex;align-items:center;gap:8px;font-size:10px;text-transform:uppercase;letter-spacing:.13em;color:var(--accent);font-weight:700}.editing-label:before{content:'';width:16px;height:1px;background:currentColor}.editor-title-row{display:flex;justify-content:space-between;align-items:center;margin:7px 0 24px}.editor-title-row h1{font:700 clamp(20px,2vw,29px)/1.15 'Madefor Display';letter-spacing:-.035em;margin:0}.more-btn{border:0;background:none;font-size:20px;cursor:pointer;color:#777}.field{margin-bottom:20px}.field label,.section-label{display:block;font-size:11px;font-weight:700;margin-bottom:8px;color:#5e5c64}.text-input,.rich-editor{width:100%;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--ink);outline:none;transition:.2s}.text-input{height:43px;padding:0 13px}.text-input:focus,.rich-editor:focus{border-color:#a9a1ef;box-shadow:0 0 0 3px var(--accent-soft)}.toolbar{height:39px;border:1px solid var(--line);border-bottom:0;border-radius:10px 10px 0 0;display:flex;align-items:center;padding:0 7px;gap:2px;background:#fbfaf8}.tool{height:27px;min-width:27px;border:0;background:none;border-radius:6px;font-size:12px;cursor:pointer;color:#64626a}.tool:hover{background:#eeece8}.tool.select{padding:0 8px;border-right:1px solid var(--line);border-radius:0;margin-right:5px}.rich-editor{border-radius:0 0 10px 10px;min-height:145px;padding:14px;resize:vertical;line-height:1.65;font-size:13px}.content-card{border:1px solid var(--line);border-radius:11px;padding:12px;display:flex;gap:12px;align-items:center;margin-bottom:9px}.media-thumb{width:68px;height:52px;border-radius:7px;background:linear-gradient(135deg,#d7d4ee,#eee6d4);display:grid;place-items:center;color:#726b96}.media-info{flex:1;min-width:0}.media-name{font-size:12px;font-weight:700;margin-bottom:3px}.media-meta{font-size:10px;color:var(--muted)}.small-btn{height:28px;padding:0 9px;border:1px solid var(--line);font-size:10px;background:#fff}.small-btn.danger{color:#b85050}.inline-actions{display:flex;gap:5px}.add-media{width:100%;height:36px;border:1px dashed #bbb6d0;background:#faf9ff;color:var(--accent-dark);font-size:11px;font-weight:700;border-radius:9px;cursor:pointer}.divider{height:1px;background:var(--line);margin:25px 0}.layout-options{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.layout-card{border:1px solid var(--line);background:#fff;border-radius:10px;padding:9px 7px 8px;cursor:pointer;text-align:left}.layout-card:hover{border-color:#bbb4ec}.layout-card.active{border-color:var(--accent);background:var(--accent-soft);box-shadow:inset 0 0 0 1px var(--accent)}.layout-preview{height:43px;border-radius:5px;background:#f0efec;margin-bottom:7px;padding:7px;display:flex;gap:4px}.layout-card.active .layout-preview{background:#fff}.layout-lines{flex:1;background:repeating-linear-gradient(to bottom,#bbb9c1 0 2px,transparent 2px 7px)}.layout-image{width:42%;background:#cac7d7;border-radius:2px}.layout-card span{font-size:9px;font-weight:700;white-space:nowrap}
.preview-panel{background:#ebeae6;display:flex;flex-direction:column}.preview-toolbar{height:57px;flex:0 0 57px;border-bottom:1px solid #d9d7d1;display:flex;align-items:center;padding:0 18px;gap:10px}.preview-toolbar .eyebrow{color:#5f5d65}.page-count{margin-left:auto;font-size:11px;color:#6e6c73;font-variant-numeric:tabular-nums}.zoom-control{display:flex;align-items:center;border:1px solid #d4d2cc;background:#f6f5f2;border-radius:8px;height:30px}.zoom-control button{width:28px;height:28px;border:0;background:none;cursor:pointer}.zoom-control span{width:42px;text-align:center;font-size:10px}.preview-stage{flex:1;min-height:0;overflow:auto;display:grid;place-items:center;padding:24px 28px;background-image:radial-gradient(#d2d0cb 1px,transparent 1px);background-size:18px 18px}.page-wrap{transition:.2s transform}.ebook-page{width:420px;aspect-ratio:210/297;background:#faf7ef;box-shadow:0 18px 48px rgba(35,31,49,.18),0 2px 6px rgba(35,31,49,.1);position:relative;overflow:hidden;color:#2e3030}.safe-area{position:absolute;inset:42px 39px 38px;display:flex;flex-direction:column}.page-header{font-size:7px;letter-spacing:.12em;text-transform:uppercase;color:#74726d;border-bottom:1px solid #d8d3c7;padding-bottom:8px;display:flex;justify-content:space-between}.page-body{flex:1;padding-top:34px;display:flex;gap:22px;flex-direction:column}.page-body.split{flex-direction:row;align-items:flex-start}.page-copy{flex:1}.chapter-kicker{font-size:8px;color:#826f4f;text-transform:uppercase;letter-spacing:.15em;font-weight:700;margin-bottom:11px}.ebook-page h2{font:700 29px/1.04 Georgia,serif;letter-spacing:-.04em;margin:0 0 17px;max-width:280px}.page-rule{width:38px;height:2px;background:#8d7250;margin-bottom:17px}.ebook-page p{font:10px/1.7 Georgia,serif;color:#53524f;margin:0;white-space:pre-line}.page-art{height:125px;border-radius:2px;background:linear-gradient(150deg,#405b50,#9db19f 55%,#e0cda5);position:relative;overflow:hidden}.page-art:before{content:'';position:absolute;width:120px;height:120px;border:1px solid rgba(255,255,255,.6);border-radius:50%;right:-26px;top:-32px}.page-art:after{content:'NUTRIÇÃO';position:absolute;bottom:12px;left:13px;color:white;font-size:7px;letter-spacing:.18em}.page-body.split .page-art{width:42%;height:210px}.page-footer{font-size:7px;border-top:1px solid #d8d3c7;padding-top:8px;display:flex;justify-content:space-between;color:#7c7972}.thumbnail-strip{height:112px;flex:0 0 112px;border-top:1px solid #d9d7d1;display:flex;align-items:center;gap:11px;padding:13px 18px;overflow:auto;background:#f2f1ed}.thumb{flex:0 0 54px;text-align:center;font-size:9px;color:#777;cursor:pointer}.thumb-page{aspect-ratio:210/297;background:#fff;border:1px solid #d8d5ce;box-shadow:0 3px 8px rgba(0,0,0,.06);margin-bottom:5px;padding:7px}.thumb.selected .thumb-page{border:2px solid var(--accent);box-shadow:0 0 0 2px #dcd8ff}.thumb-lines{height:100%;background:linear-gradient(#d5d0c4 0 2px,transparent 2px 8px,#b9a47f 8px 28px,transparent 28px 34px,#ddd8ce 34px 36px,transparent 36px)}
.modal-backdrop{position:fixed;inset:0;background:rgba(25,24,30,.45);backdrop-filter:blur(4px);display:grid;place-items:center;z-index:50;padding:20px}.dialog{width:min(480px,100%);background:#fff;border-radius:18px;box-shadow:0 30px 90px rgba(0,0,0,.22);padding:27px}.dialog-head{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:24px}.dialog h2{font:700 25px 'Madefor Display';margin:0 0 5px}.dialog p{font-size:12px;color:var(--muted);margin:0}.dialog-grid{display:grid;grid-template-columns:1fr 1fr;gap:13px}.dialog .field{margin:0}.dialog .field.full{grid-column:1/-1}.dialog-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:24px}.empty-editor{height:100%;display:grid;place-content:center;text-align:center;padding:40px;color:var(--muted)}.empty-editor strong{color:var(--ink);font-size:18px;margin-bottom:7px}.toast{position:fixed;bottom:18px;left:50%;transform:translateX(-50%);background:#25242b;color:white;padding:10px 14px;border-radius:9px;font-size:12px;z-index:70;box-shadow:var(--shadow)}
.project-picker{margin-bottom:20px}.project-list{display:grid;gap:8px;margin-top:12px;max-height:190px;overflow:auto}.project-row{border:1px solid var(--line);background:#faf9f7;border-radius:10px;padding:11px 12px;display:flex;align-items:center;text-align:left;cursor:pointer}.project-row:hover{border-color:#aaa2ec;background:#f7f5ff}.project-row>span:first-child{width:34px;height:34px;border-radius:8px;background:var(--accent-soft);display:grid;place-items:center;color:var(--accent);font-weight:700;margin-right:10px}.project-row strong{display:block;font-size:12px}.project-row small{color:var(--muted);font-size:10px}.project-row .open-label{margin-left:auto;color:var(--accent);font-size:10px;font-weight:700}.or-divider{text-align:center;color:#aaa;font-size:10px;text-transform:uppercase;letter-spacing:.1em;margin:18px 0;display:flex;align-items:center;gap:9px}.or-divider:before,.or-divider:after{content:'';height:1px;background:var(--line);flex:1}.media-library{overflow:auto;padding:28px}.media-head{display:flex;align-items:flex-start;justify-content:space-between;border-bottom:1px solid var(--line);padding-bottom:22px}.media-head h1{font:700 27px 'Madefor Display';margin:8px 0 4px}.media-head p{margin:0;color:var(--muted);font-size:12px}.asset-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px;padding-top:22px}.asset-card{border:1px solid var(--line);background:#fff;border-radius:11px;padding:8px;text-align:left;cursor:pointer}.asset-card:hover{border-color:#aaa2ec;box-shadow:0 8px 20px rgba(49,43,88,.08)}.asset-visual{height:110px;border-radius:7px;background:linear-gradient(145deg,#d7d4ee,#ebe6d8);display:grid;place-items:center;color:#6e6790;font-size:10px;letter-spacing:.14em;margin-bottom:9px}.asset-card strong,.asset-card small{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.asset-card strong{font-size:11px}.asset-card small{font-size:9px;color:var(--muted);margin-top:3px}.empty-editor .ghost-btn{margin:16px auto 0}
@media(max-width:1250px){.workspace{grid-template-columns:68px 245px minmax(360px,1fr) minmax(380px,43vw)}.editor-scroll{padding-left:22px;padding-right:22px}.ebook-page{width:360px}.layout-options{grid-template-columns:1fr 1fr}}
@media(max-width:980px){.workspace{grid-template-columns:68px 230px 1fr}.preview-panel{display:none}.project-identity{display:none}.topbar{padding:0 12px}.brand{min-width:auto}.ghost-btn span{display:none}}
@media(max-width:680px){.workspace{grid-template-columns:60px 1fr}.structure-panel{display:none}.top-actions>.icon-btn{display:none}.brand-name{display:none}.editor-scroll{padding:20px 16px}.dialog-grid{grid-template-columns:1fr}.dialog .field.full{grid-column:auto}}
