/* Estúdio imersivo. Estilos restritos a esta tela; demais módulos mantêm seu layout. */
body.studio-mode{overflow:hidden}.studio-mode .main{height:100dvh;display:flex;flex-direction:column}.studio-mode .topbar{height:54px;min-height:54px;padding:0 22px;font-size:12px}.studio-mode .avatar{width:30px;height:30px}.studio-mode .company-select{padding:6px 10px;font-size:12px}.studio-mode .content{height:calc(100dvh - 54px);width:100%;max-width:none;margin:0;padding:0;overflow:hidden}.studio-app{display:flex;flex-direction:column;height:100%;background:#f3f5fa;position:relative}.studio-header{display:flex;align-items:center;gap:15px;min-height:62px;padding:10px 20px;background:white;border-bottom:1px solid var(--line);flex-wrap:wrap}.studio-heading{display:flex;align-items:center;gap:14px;min-width:0}.studio-heading>strong{font-size:17px;white-space:nowrap;letter-spacing:-.4px}.studio-name{background:none;border:0;color:#6b7e9b;font-size:12px;max-width:230px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.studio-header>.actions{margin-left:auto;gap:6px}.save-indicator{color:#8392a8;font-size:10px;white-space:nowrap}.save-indicator.unsaved{color:#b17d2e}.studio-tabs{display:flex;align-items:center;gap:8px;background:#fff;border-bottom:1px solid var(--line);padding:0 20px;height:45px;min-height:45px;overflow:auto}.studio-tabs button{background:none;border:0;border-bottom:3px solid transparent;padding:13px 20px;color:#64718c;white-space:nowrap;font-size:12px;font-weight:600}.studio-tabs button.active{border-bottom-color:#195bed;background:#eef3ff;color:#195bed}.studio-ribbon{background:white;min-height:67px;padding:10px 20px;display:flex;align-items:center;gap:16px;overflow:auto;border-bottom:1px solid #dfe5ef;flex-shrink:0}.ribbon-field{display:flex;align-items:center;gap:8px;color:#364c6d;font-size:11px;flex-shrink:0}.ribbon-field span{white-space:nowrap}.ribbon-field input[type=color]{width:30px;height:30px;border:0;padding:0;background:transparent;cursor:pointer}.ribbon-field input[type=range]{width:85px;padding:0;accent-color:#195bed}.ribbon-field input[type=number]{width:65px;padding:6px}.ribbon-field select{max-width:230px;font-size:11px;padding:7px 9px}.ribbon-field output{min-width:32px;font-size:10px}.ribbon-note{font-size:11px;color:#8793a8;white-space:nowrap}.studio-ribbon>.btn{white-space:nowrap;flex-shrink:0}.studio-canvas-wrap{position:relative;min-height:0;flex:1;overflow:hidden}.design-stage{height:100%;width:100%;overflow:auto;position:relative;overscroll-behavior:contain;background:#e9edf4;background-image:radial-gradient(#ccd4e1 .7px,transparent .7px);background-size:14px 14px}.stage-space{padding:50px 70px 70px;min-width:100%;min-height:100%;display:flex;align-items:center;justify-content:center;width:max-content;height:max-content;cursor:default}.studio-app .art-preview{width:auto;max-width:none;height:auto;flex-shrink:0;filter:drop-shadow(0 8px 20px #1b34551a);position:relative;touch-action:none;user-select:none}.studio-app .art-preview>svg{display:block;width:100%;height:100%;overflow:hidden}.studio-app [data-component]{cursor:grab}.studio-app [data-component]:active{cursor:grabbing}.studio-app .art-preview:focus{outline:none}.ruler{position:sticky;background:#f4f6faeF;color:#7a88a0;font:9px Segoe UI,Arial;z-index:2;pointer-events:none;overflow:hidden}.ruler-x{top:0;left:0;height:23px;min-width:100%;margin-bottom:-23px;border-bottom:1px solid #d3dbe9}.ruler-y{top:0;left:0;width:24px;height:100%;margin-bottom:-100%;border-right:1px solid #d3dbe9;position:absolute}.ruler-x span{position:absolute;top:5px;height:18px;border-left:1px solid #a6b1c3;padding-left:4px}.ruler-y span{position:absolute;left:2px;width:21px;border-top:1px solid #a6b1c3;padding-top:3px}.ruler-unit{position:sticky;left:0;top:0;width:24px;height:23px;display:block;margin-bottom:-23px;font-size:8px;padding:6px;background:#f4f6fa;z-index:3;color:#7a88a0;pointer-events:none}.studio-status{height:44px;min-height:44px;background:white;border-top:1px solid var(--line);display:flex;align-items:center;gap:18px;padding:0 18px;font-size:10px;color:#637592;overflow:auto}.studio-status>span:first-child{color:#2d405e;white-space:nowrap}.studio-status label{display:flex;align-items:center;gap:5px;white-space:nowrap;cursor:pointer}.studio-status input{width:13px;height:13px;padding:0;accent-color:#195bed}.zoom-tools{display:flex;align-items:center;gap:8px;margin-left:auto;white-space:nowrap}.zoom-tools .btn{padding:4px 8px;font-size:10px}.zoom-tools output{min-width:35px;text-align:center}.status-hint{font-size:9px;color:#9aa6b8;white-space:nowrap}.context-tools{position:absolute;z-index:4;display:flex;align-items:center;gap:7px;padding:8px 10px;border:1px solid #dce4ef;border-radius:10px;box-shadow:0 4px 15px #17325c1c;background:#fffffff5;max-width:calc(100% - 24px);overflow:auto;white-space:nowrap;font-size:10px}.context-tools[hidden]{display:none}.context-tools strong{max-width:110px;overflow:hidden;text-overflow:ellipsis;font-size:10px}.context-tools label{display:flex;align-items:center;gap:4px}.context-tools input{width:50px;padding:5px;font-size:10px;border-color:#e4eaf3}.context-tools .btn{padding:5px 7px;font-size:10px}.studio-trash{position:absolute;bottom:55px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:9px;padding:12px 20px;background:#fff4f4ee;border:1.5px dashed #e66b76;border-radius:35px;color:#b7384c;z-index:5;box-shadow:0 4px 20px #b5314510;pointer-events:none;font-size:12px;white-space:nowrap}.studio-trash[hidden]{display:none}.studio-trash>span{font-size:23px}.studio-trash small{font-size:9px;color:#a8717a}.studio-trash.over{background:#d74458;color:white;border-style:solid;transform:translateX(-50%) scale(1.08)}.studio-trash.over small{color:white}.layers-toggle{position:absolute;right:22px;bottom:20px;z-index:3;font-size:11px;box-shadow:0 2px 8px #263a5812}.layers-panel{position:absolute;top:16px;right:16px;bottom:68px;overflow:auto;background:white;z-index:6;width:310px;max-width:calc(100% - 32px);box-shadow:0 8px 30px #112e581c;border:1px solid #dfe5ef;border-radius:13px;padding:16px}.layers-panel header{display:flex;align-items:center;justify-content:space-between}.layers-panel>p{font-size:10px;color:#8996ab;line-height:1.6}.layer-row{display:flex;gap:3px;align-items:center;padding:8px 0;border-bottom:1px solid #edf1f7}.layer-row button{border:0;background:none;font-size:11px;color:#647695;cursor:pointer;padding:6px 4px}.layer-row .layer-name{flex:1;text-align:left;max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.layer-row.chosen{background:#edf3ff}.layer-row.chosen .layer-name{color:#195bed;font-weight:600}.studio-drawer{position:absolute;inset:14px auto 14px 14px;width:590px;max-width:calc(100% - 28px);background:#fff;z-index:7;border:1px solid #dfe5ef;border-radius:14px;box-shadow:0 10px 40px #122d4d29;overflow:auto;padding:20px}.studio-drawer[hidden]{display:none}.studio-drawer>header{display:flex;gap:10px;align-items:start;justify-content:space-between}.studio-drawer strong{font-size:15px}.studio-drawer header p{font-size:11px;color:#8693a8;margin:6px 0 15px}.gallery-filters{display:grid;grid-template-columns:1fr 1fr;gap:8px}.gallery-filters input,.gallery-filters select{font-size:11px;padding:8px}.gallery-warning{font-size:10px;line-height:1.6;color:#8a96a8;margin:12px 0 20px}.template-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.template-card{text-align:left;border:1px solid #e0e7f2;border-radius:10px;background:white;padding:10px;cursor:pointer;overflow:hidden}.template-card:hover{border-color:#6695ff;box-shadow:0 3px 12px #195bed13}.template-card .template-thumb{height:170px;background:#f0f3f8;display:flex;align-items:center;justify-content:center;margin-bottom:10px;border-radius:5px;padding:8px;pointer-events:none;overflow:hidden}.template-thumb svg{max-width:100%;max-height:100%;width:auto;height:auto;filter:drop-shadow(0 2px 4px #0001)}.template-card strong{font-size:11px;display:block;line-height:1.5}.template-card small{display:block;font-size:10px;color:#6e7f98;margin:5px 0}.template-card>span{display:block;font-size:9px;color:#98a4b7}.studio-mode .modal input[type=range]{accent-color:#195bed}.studio-app .notice{font-size:12px}.studio-status .btn{background:#fbfcfe}.studio-header .btn.primary{background:#195bed}
@media(min-width:1500px){.studio-mode .sidebar{width:220px}.studio-mode .shell{grid-template-columns:220px minmax(0,1fr)}}
@media(max-width:1250px){.studio-header{gap:8px}.studio-heading>strong{font-size:15px}.studio-name{max-width:150px}.save-indicator{display:none}.status-hint{display:none}.studio-header>.actions{gap:4px}.studio-header .btn{padding:7px 8px;font-size:10px}}
@media(max-width:960px){.studio-header{min-height:90px}.studio-heading{flex:1}.studio-header>.actions{width:100%;justify-content:end}.studio-tabs{padding:0 8px;gap:0}.studio-tabs button{padding:13px 12px}.studio-ribbon{padding:8px 12px;gap:12px}.studio-status{gap:10px;font-size:9px}.context-tools label{font-size:9px}.context-tools{max-width:calc(100% - 16px)}}
@media(max-width:760px){.studio-mode .topbar{padding:0 10px}.studio-heading>strong{font-size:14px}.studio-name{max-width:150px}.studio-header{padding:8px 10px}.studio-header .actions{overflow:auto;flex-wrap:nowrap;justify-content:start}.studio-header .btn{white-space:nowrap;flex-shrink:0}.studio-tabs button{font-size:11px}.studio-ribbon{min-height:58px}.studio-status{padding:0 10px;gap:12px;min-height:47px}.studio-status>span:first-child{font-size:8px}.zoom-tools{gap:4px}.zoom-tools #zoom-fit{font-size:0}.zoom-tools #zoom-fit:after{content:'Ajustar';font-size:9px}.stage-space{padding:45px 50px 90px}.context-tools{left:8px!important;top:8px!important;max-width:calc(100% - 16px);padding:6px}.context-tools>strong{display:none}.context-tools label{gap:2px}.context-tools input{width:42px}.context-tools .btn{font-size:9px;padding:5px}.studio-trash{font-size:10px;bottom:65px;padding:10px 14px}.studio-trash small{display:none}.studio-drawer{padding:15px}.template-thumb{height:140px}.studio-mode .sidebar{height:100dvh;z-index:20}}
@media print{.studio-app,.sidebar,.topbar{display:none!important}.print-only{display:block!important}}

.canvas-rulers{position:absolute;inset:0;pointer-events:none;z-index:2;overflow:hidden}.canvas-rulers .ruler-x{position:absolute;top:0;left:0;width:100%;margin:0}.canvas-rulers .ruler-y{position:absolute;top:0;left:0;height:100%;margin:0}.canvas-rulers .ruler-unit{position:absolute;top:0;left:0;margin:0}.studio-mode .studio-app .art-preview{background-size:14px 14px}

/* Clique seleciona; somente manter pressionado ou puxar a borda inicia movimento. */
.studio-app [data-component]{cursor:pointer}.studio-app .art-preview.moving-component,.studio-app .moving-component [data-component]{cursor:grabbing}.studio-app [data-move-handle]{cursor:move}
.studio-app .art-preview:not(.moving-component) [data-component],.studio-app .art-preview:not(.moving-component) [data-component]:active{cursor:pointer}

/* Ações de camadas legíveis, com áreas de clique generosas e estado explícito. */
.layers-panel{width:360px;padding:18px}.layers-panel header{gap:12px}.layers-panel header strong{font-size:16px;display:flex;align-items:center;gap:8px}.layers-panel header .btn{min-width:36px;min-height:36px;font-size:19px}.layer-count{background:#edf3ff;color:#195bed;border-radius:20px;padding:3px 9px;font-size:12px}.layers-panel>p{font-size:12px;color:#586b88}.layer-legend{font-size:11px;color:#657792;margin:16px 0 8px}.layers-panel .layer-row{display:flex;flex-direction:column;align-items:stretch;gap:8px;padding:10px;border:1px solid #dce4ef;border-radius:11px;margin-bottom:9px;background:#fafbfd}.layers-panel .layer-row.chosen{border-color:#195bed;box-shadow:inset 3px 0 #195bed;background:#eef4ff}.layers-panel .layer-row.is-hidden{background:#f3f4f7}.layers-panel .layer-name{max-width:none;width:100%;min-height:40px;padding:2px 4px;display:flex;flex-direction:column;gap:4px;color:#263c5e;font-size:13px;font-weight:600;overflow:hidden}.layer-name>span{width:100%;overflow:hidden;text-overflow:ellipsis}.layer-name small{font-size:11px;font-weight:400;color:#64758e}.layer-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}.layers-panel .layer-action{min-width:44px;min-height:44px;padding:7px 4px;border:1px solid #cdd8e8;border-radius:8px;background:white;color:#405675;display:flex;align-items:center;justify-content:center;gap:5px;flex-direction:column}.layer-action svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.layer-action span{font-size:10px;font-weight:600}.layers-panel .layer-action.is-active{color:#1552d2;border-color:#afc7fc;background:#eaf1ff}.layers-panel .layer-action[data-prop=locked].is-active{color:#865812;border-color:#e4c383;background:#fff5df}.layers-panel .layer-action:hover:not(:disabled){background:#ddeaff;border-color:#195bed;color:#124cce}.layers-panel .layer-action:disabled{opacity:.4;cursor:not-allowed}.layer-row button:focus-visible{outline:2px solid #195bed;outline-offset:2px}.layers-toggle{font-size:13px;min-height:42px;padding:10px 16px}

.production-export{margin-top:20px;border-top:1px solid #dce4f2;padding-top:16px}.production-export summary{cursor:pointer;font-weight:700;padding:8px 0}.production-settings{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.production-layers{border:1px solid #dce4f2;border-radius:10px;max-height:180px;overflow:auto;margin:12px 0;padding:12px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.production-layers label{display:flex;gap:8px;align-items:center;font-size:12px}.production-layers input{width:auto}.production-export .notice{margin:12px 0}#production-progress{font-size:12px;overflow-wrap:anywhere}@media(max-width:500px){.production-settings,.production-layers{grid-template-columns:1fr}}
