:root{--bg:#eceef2;--surface:#fff;--ink:#1c1c1e;--muted:#6b7280;--line:#dfe2e8;--accent:#2f6fed;--accent-soft:#e6eefd;--danger:#d92d20;--radius:12px;--shadow:0 8px 28px #14182829, 0 1px 3px #1418281a;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light}*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}html,body{overscroll-behavior:none;background:var(--bg);height:100%;color:var(--ink);-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;margin:0;font:15px/1.4 system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;overflow:hidden}#app{height:100%}button,input,textarea{font:inherit;color:inherit}button{cursor:pointer;touch-action:manipulation}[hidden]{display:none!important}.ico{flex:none;width:auto;display:inline-flex}.ico svg{display:block}.muted{color:var(--muted);font-size:13.5px}.btn{border:1px solid var(--line);background:var(--surface);height:40px;color:var(--ink);white-space:nowrap;border-radius:10px;justify-content:center;align-items:center;gap:7px;padding:0 15px;font-weight:550;text-decoration:none;display:inline-flex}.btn:active{background:#f1f3f6}.btn.primary{background:var(--accent);border-color:var(--accent);color:#fff}.btn.primary:active{background:#255bd0}.btn.danger{background:var(--danger);border-color:var(--danger);color:#fff}.btn.wide{width:100%}.btn:disabled{opacity:.6}.iconbtn{color:#3a3d46;background:0 0;border:0;border-radius:10px;flex:none;justify-content:center;align-items:center;width:40px;height:40px;display:inline-flex}.iconbtn:hover{background:#f0f2f5}.iconbtn.active{background:var(--accent-soft);color:var(--accent)}.iconbtn:disabled{opacity:.3;cursor:default;background:0 0}.input{border:1px solid var(--line);-webkit-user-select:text;user-select:text;background:#fff;border-radius:10px;outline:none;width:100%;height:42px;padding:0 12px}.input:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}.chip{background:var(--accent);color:#fff;border:0;border-radius:16px;flex:none;height:32px;padding:0 14px;font-weight:600}.auth,.splash{text-align:center;flex-direction:column;justify-content:center;align-items:center;gap:14px;height:100%;padding:20px;display:flex}.auth.overlay{z-index:100;background:#eceef2f5;position:fixed;inset:0}.auth-card{background:var(--surface);width:min(380px,100%);box-shadow:var(--shadow);text-align:left;border-radius:18px;flex-direction:column;gap:12px;padding:28px;display:flex}.auth-card p{margin:0 0 4px}.auth-msg{min-height:20px;color:var(--danger);font-size:13.5px}.brand{align-items:center;gap:9px;display:flex}.brand h1{letter-spacing:-.02em;margin:0;font-size:21px}.brand.big h1{font-size:26px}.brand-mark{background:linear-gradient(140deg,#3d7bff,#1b3fa8);border-radius:8px 8px 8px 2px;width:26px;height:26px;box-shadow:inset 0 -5px #00000024}.spinner{border:3px solid var(--line);border-top-color:var(--accent);border-radius:50%;width:30px;height:30px;animation:.8s linear infinite spin}@keyframes spin{to{transform:rotate(360deg)}}.library{flex-direction:column;height:100%;display:flex}.lib-head{background:var(--surface);border-bottom:1px solid var(--line);flex-wrap:wrap;align-items:center;gap:14px;padding:10px 18px;display:flex}.lib-head .search{flex:180px;max-width:360px;height:40px}.lib-actions{align-items:center;gap:8px;margin-left:auto;display:flex}.lib-main{-webkit-overflow-scrolling:touch;flex:1;padding:22px 18px 60px;overflow-y:auto}.lib-grid{grid-template-columns:repeat(auto-fill,minmax(168px,1fr));gap:22px 18px;max-width:1280px;margin:0 auto;display:grid}.card{cursor:pointer;outline:none;min-width:0}.card-cover{background:#fff;border-left:5px solid #2b4c9b;border-radius:6px 10px 10px 6px;width:100%;transition:transform .12s;overflow:hidden;box-shadow:0 1px 2px #14182824,0 6px 16px #1418281a}.card:hover .card-cover,.card:focus-visible .card-cover{transform:translateY(-2px)}.card-cover img{object-fit:cover;width:100%;height:100%;display:block}.card-info{align-items:flex-start;gap:2px;padding:9px 0 0 2px;display:flex}.card-text{flex:1;min-width:0}.card-title{text-overflow:ellipsis;white-space:nowrap;font-weight:600;overflow:hidden}.card-sub{color:var(--muted);font-size:12.5px}.card-more{width:32px;height:32px;margin-top:-3px}.empty{text-align:center;color:var(--muted);flex-direction:column;grid-column:1/-1;align-items:center;gap:8px;padding:12vh 16px;display:flex}.empty h2{color:var(--ink);margin:6px 0 0;font-size:19px}.empty p{max-width:340px;margin:0}.empty-art{background:var(--accent-soft);width:84px;height:84px;color:var(--accent);border-radius:24px;place-items:center;display:grid}.empty-actions{flex-wrap:wrap;justify-content:center;gap:10px;margin-top:12px;display:flex}.editor{grid-template-rows:auto minmax(0,1fr);grid-template-columns:minmax(0,1fr);height:100%;display:grid}.topbar{background:var(--surface);border-bottom:1px solid var(--line);z-index:6;grid-row:1;align-items:center;gap:6px;min-height:52px;padding:4px 8px;display:flex}.tb-left,.tb-right{flex:none;align-items:center;gap:2px;display:flex}.tb-left{flex:0 220px;min-width:0}.title{text-overflow:ellipsis;white-space:nowrap;background:0 0;border:0;border-radius:8px;min-width:0;max-width:100%;height:36px;padding:0 8px;font-weight:600;overflow:hidden}.title:hover{background:#f0f2f5}.tb-tools{scrollbar-width:none;flex:1;justify-content:center;align-items:center;gap:2px;min-width:0;display:flex;overflow-x:auto}.tb-tools::-webkit-scrollbar{display:none}.tb-sep{background:var(--line);flex:none;width:1px;height:26px;margin:0 8px}.tb-sizes,.tb-colors{flex:none;align-items:center;gap:2px;display:flex}.tb-colors{gap:5px;margin-left:8px}.szbtn{background:0 0;border:0;border-radius:10px;flex:none;place-items:center;width:36px;height:40px;display:grid}.szbtn.active{background:var(--accent-soft)}.sz-dot{background:#3a3d46;border-radius:50%;display:block}.sz-text{color:#3a3d46;font-weight:700;line-height:1}.swatch{background:var(--c);border:0;border-radius:50%;flex:none;width:28px;height:28px;padding:0;box-shadow:inset 0 0 0 1px #00000029}.swatch.active{box-shadow:inset 0 0 0 1px #00000029, 0 0 0 2px #fff, 0 0 0 4px var(--accent)}.syncbadge[data-state=ok]{color:#2a9d63}.syncbadge[data-state=off],.syncbadge[data-state=err]{color:#c2410c}.syncbadge[data-state=busy] svg{animation:1.1s linear infinite spin}@media (max-width:1099px){.topbar{flex-wrap:wrap;row-gap:0}.tb-left{flex:1 1 0}.tb-tools{border-top:1px solid var(--line);flex:1 0 100%;order:3;justify-content:safe center;padding:2px 0}}.viewport{touch-action:none;cursor:crosshair;background:#e3e5ea;grid-area:2/1;position:relative;overflow:hidden}.viewport[data-tool=hand]{cursor:grab}.viewport[data-tool=text]{cursor:text}.viewport[data-tool=lasso]{cursor:default}.world{transform-origin:0 0;width:0;height:0;position:absolute;top:0;left:0}.page{background:#fff;position:absolute;box-shadow:0 0 0 .5px #1418281f,0 2px 6px #14182824}.page.locked:after{content:"Página ainda não baixada neste aparelho";color:var(--muted);place-items:center;font-size:13px;display:grid;position:absolute;inset:0}.page.pdferror:after{content:"Não foi possível carregar o PDF desta página (sem conexão?)";color:var(--muted);text-align:center;place-items:center;padding:20px;font-size:13px;display:grid;position:absolute;inset:0}.pagecanvas{width:100%;height:100%;display:block;position:absolute;inset:0}.detail,.live{pointer-events:none;width:100%;height:100%;position:absolute;inset:0}.detail{visibility:hidden}.addpage{color:#5a6170;background:#ffffff80;border:1px dashed #aab1bf;border-radius:6px;justify-content:center;align-items:center;gap:6px;font-size:13px;font-weight:600;display:flex;position:absolute}.textedit{outline:1px dashed var(--accent);outline-offset:3px;resize:none;white-space:pre-wrap;overflow-wrap:anywhere;-webkit-user-select:text;user-select:text;touch-action:none;background:#fff9;border:0;margin:0;padding:0;position:absolute;overflow:hidden}.selbox{border:1.5px dashed var(--accent);pointer-events:none;border-radius:4px;position:absolute}.handle{border:2px solid var(--accent);pointer-events:auto;touch-action:none;background:#fff;border-radius:50%;width:16px;height:16px;position:absolute}.handle:after{content:"";position:absolute;inset:-12px}.handle.nw{cursor:nwse-resize;top:-9px;left:-9px}.handle.ne{cursor:nesw-resize;top:-9px;right:-9px}.handle.sw{cursor:nesw-resize;bottom:-9px;left:-9px}.handle.se{cursor:nwse-resize;bottom:-9px;right:-9px}.selmenu{box-shadow:var(--shadow);white-space:nowrap;background:#23252b;border-radius:12px;padding:4px;display:flex;position:absolute}.selmenu button{color:#fff;background:0 0;border:0;border-radius:8px;align-items:center;gap:6px;height:36px;padding:0 10px;font-size:13.5px;display:flex}.selmenu button:active{background:#ffffff29}@media (max-width:560px){.selmenu button span:not(.ico){display:none}}.pageind{color:#fff;font-variant-numeric:tabular-nums;pointer-events:none;background:#23252bb8;border-radius:12px;padding:4px 10px;font-size:12.5px;position:absolute;bottom:12px;right:12px}.pageind:empty{display:none}.pagespanel{background:var(--surface);border-left:1px solid var(--line);z-index:5;flex-direction:column;grid-area:2/1;justify-self:end;width:196px;min-height:0;display:flex;box-shadow:-6px 0 18px #14182814}.pp-head{border-bottom:1px solid var(--line);justify-content:space-between;align-items:center;padding:6px 6px 6px 14px;display:flex}.pp-list{flex-direction:column;flex:1;gap:12px;min-height:0;padding:12px;display:flex;overflow-y:auto}.pp-item{cursor:pointer;flex:none}.pp-frame{width:100%;box-shadow:0 0 0 1px var(--line);background:#fff;border-radius:4px;overflow:hidden}.pp-item.current .pp-frame{box-shadow:0 0 0 2.5px var(--accent)}.pp-frame canvas{width:100%;height:100%;display:block}.pp-foot{color:var(--muted);justify-content:space-between;align-items:center;padding-left:4px;font-size:12.5px;display:flex}.pp-more{width:30px;height:28px}.pp-add{flex:none;margin:10px 12px 12px}.popover{z-index:60;background:var(--surface);min-width:160px;max-width:calc(100vw - 16px);box-shadow:var(--shadow);border:1px solid var(--line);border-radius:14px;padding:6px;position:fixed}.menu{flex-direction:column;display:flex}.menu-item{text-align:left;white-space:nowrap;background:0 0;border:0;border-radius:9px;align-items:center;gap:10px;min-height:40px;padding:0 12px 0 8px;display:flex}.menu-item .ico:first-child{color:#4b4f5a;width:20px}.menu-item span:nth-child(2){flex:1}.menu-item:hover{background:#f0f2f5}.menu-item.danger,.menu-item.danger .ico:first-child{color:var(--danger)}.menu-sep{background:var(--line);height:1px;margin:5px 4px}.slider-box{width:230px;padding:8px 10px 10px}.slider-val{font-variant-numeric:tabular-nums;margin-bottom:6px;font-weight:600}.slider{width:100%;accent-color:var(--accent);touch-action:pan-x}.colorbox{padding:6px}.colorgrid{grid-template-columns:repeat(6,30px);gap:9px;display:grid}.colorgrid .swatch{width:30px;height:30px}.customcolor{border-top:1px solid var(--line);color:var(--muted);align-items:center;gap:10px;margin-top:12px;padding-top:10px;font-size:13.5px;display:flex}.colorinput{background:0 0;border:0;width:38px;height:30px;padding:0}.backdrop{z-index:80;background:#14182861;place-items:center;padding:16px;display:grid;position:fixed;inset:0}.modal{background:var(--surface);width:min(430px,100%);max-height:calc(100dvh - 32px);box-shadow:var(--shadow);border-radius:18px;flex-direction:column;display:flex}.modal-head{justify-content:space-between;align-items:center;padding:14px 10px 6px 20px;display:flex}.modal-head h2{margin:0;font-size:17px}.modal-body{padding:8px 20px 16px;overflow-y:auto}.modal-text{color:#3a3d46;margin:0}.modal-actions{justify-content:flex-end;gap:8px;padding:4px 20px 18px;display:flex}.form{flex-direction:column;gap:4px;display:flex}.field-label{color:var(--muted);text-transform:uppercase;letter-spacing:.04em;margin:12px 0 6px;font-size:12.5px;font-weight:600}.optrow{flex-wrap:wrap;gap:8px;display:flex}.opt{border:1.5px solid var(--line);background:#fff;border-radius:10px;flex-direction:column;align-items:center;gap:6px;min-width:82px;padding:8px;font-size:12.5px;display:flex}.opt.textonly{flex-direction:row;justify-content:center;height:38px;padding:0 14px;font-size:14px}.opt.active{border-color:var(--accent);background:var(--accent-soft)}.tplprev{background-color:#fff;border-radius:4px;width:56px;height:44px;box-shadow:inset 0 0 0 1px #00000024}.tplprev.lined{background-image:linear-gradient(#b9c5d8 1px,#0000 1px);background-position:0 6px;background-size:100% 8px}.tplprev.grid{background-image:linear-gradient(#c3cddd 1px,#0000 1px),linear-gradient(90deg,#c3cddd 1px,#0000 1px);background-size:8px 8px}.tplprev.dots{background-image:radial-gradient(#9aa6ba 1px,#0000 1.3px);background-size:8px 8px}.exportbox{flex-direction:column;gap:12px;padding-top:4px;display:flex}.progress{background:var(--line);border-radius:3px;height:6px;overflow:hidden}.progress-fill{background:var(--accent);width:3%;height:100%;transition:width .2s}.progress-label{font-weight:550}.exportactions{gap:10px;display:flex}.exportactions .btn{flex:1}.toasts{z-index:120;pointer-events:none;flex-direction:column;align-items:center;gap:8px;width:max-content;max-width:calc(100vw - 24px);display:flex;position:fixed;bottom:22px;left:50%;transform:translate(-50%)}.toast{color:#fff;box-shadow:var(--shadow);text-align:center;background:#23252b;border-radius:12px;padding:10px 16px;font-size:14px}.toast.error{background:#9f1c12}@media (max-width:640px){.lib-head{gap:8px;padding:8px 12px}.lib-head .search{flex-basis:100%;order:3;max-width:none}.lib-actions .btn span:not(.ico){display:none}.lib-grid{grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:18px 14px}}
