/* UI-083 · Cardápio Studio · design grunge responsivo e acessível.
   Inspirado no wireframe sem copiar dados fictícios. Mobile-first no fluxo:
   navegação horizontal, campos empilhados, prévia isolada e sem overlays fixos.
   ANTES: Cardápio Atualizado indisponível. ROLLBACK: reverter UI-083. */
:root{color-scheme:dark;--bg:#0d100e;--surface:#1a221c;--surface2:#222c25;--stroke:#485b4b;--text:#edf5e9;--muted:#acc4aa;--lime:#c6ff00;--red:#e47069}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;min-width:320px;min-height:100vh;background:
 radial-gradient(ellipse 37% 40% at 96% 3%,#4f171944,transparent 80%),
 radial-gradient(ellipse 30% 50% at 0 78%,#6176281a,transparent 79%),
 linear-gradient(140deg,#131715,#090c0a);font:14px/1.5 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--text)}
button,input,select,textarea{font:inherit}
button{cursor:pointer}
input,select,textarea{color:#e8f4e3;background:#101814;border:1px solid #5a705a;border-radius:10px;min-height:44px;padding:10px 12px;max-width:100%;width:100%}
input[type=color]{min-height:43px;padding:3px 5px;cursor:pointer}
input[type=checkbox]{width:19px;height:19px;min-height:0;accent-color:#baf279;vertical-align:middle}
input[type=range]{min-height:30px;padding:0;accent-color:#c6ff00;cursor:pointer}
input:focus-visible,select:focus-visible,textarea:focus-visible,button:focus-visible,a:focus-visible,summary:focus-visible{outline:2px solid var(--lime);outline-offset:3px}
a{color:inherit}
button:disabled,input:disabled{opacity:.55;cursor:not-allowed}
[hidden]{display:none!important}
.skip{position:absolute;left:-100vw;top:10px;background:#c6ff00;color:#111;padding:9px 15px;z-index:99}
.skip:focus{left:12px}
.studio-app{max-width:1920px;margin:0 auto}
.studio-top{min-height:91px;display:flex;align-items:center;justify-content:space-between;gap:15px;padding:15px clamp(14px,2vw,30px);border-bottom:1px solid #3a4a3d;background:#121813}
.studio-brand{display:flex;align-items:center;gap:13px;min-width:0}
.studio-brand>img{width:55px;height:55px;object-fit:cover;border-radius:12px;border:1px solid #667849}
.studio-brand>div{min-width:0}
.studio-brand h1{font-size:clamp(1.25rem,2vw,1.8rem);font-weight:900;line-height:1.08;letter-spacing:-.035em;margin:3px 0 1px}
.studio-brand h1 em{font-style:normal;color:var(--lime)}
.studio-brand p{font-size:.73rem;color:var(--muted);margin:0}
.eyebrow{color:#bed6ad;letter-spacing:.14em;font-weight:900;font-size:.64rem}
.studio-back{border:1px solid #678260;padding:9px 11px;border-radius:9px;text-decoration:none;font-weight:800;font-size:.78rem;white-space:nowrap;color:#e4f0d7}
.studio-back:hover{background:#2d3f2e}
.top-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.top-status{font-size:.75rem;font-weight:800;color:#c6d4bf;padding:6px 9px;border-radius:8px;border:1px solid #475849;white-space:nowrap}
.studio-btn{appearance:none;display:inline-flex;align-items:center;justify-content:center;gap:7px;text-align:center;min-height:43px;padding:10px 14px;border:1px solid #6a8265;border-radius:10px;background:#273a29;color:#eef8e8;font-weight:850;font-size:.78rem;text-decoration:none;line-height:1.25;white-space:nowrap;transition:background .12s,border-color .12s,transform .12s}
.studio-btn:hover:not(:disabled){background:#39503b;border-color:#9bc57c}
.studio-btn:active:not(:disabled){transform:scale(.984)}
.studio-btn.primary{background:var(--lime);border-color:var(--lime);color:#15200f}
.studio-btn.primary:hover:not(:disabled){background:#e0ff7b}
.studio-btn.secondary{background:#354e34}
.studio-btn.ghost{background:transparent}
.studio-btn.danger{border-color:#9a5b5b;background:#3c2528;color:#ffd7d4}
.studio-btn.small{padding:8px 10px;min-height:35px;font-size:.73rem}
.studio-btn.block{width:100%}
.editor-notice{padding:8px clamp(14px,2vw,30px);color:#b9d5b1;background:#19261c;border-bottom:1px solid #334936;font-size:.76rem;min-height:38px}
.editor-notice.is-error{color:#ffd3bf;background:#3b201d}
.editor-notice.is-success{color:#c8f1a7}
.studio-layout{display:grid;grid-template-columns:195px minmax(0,1fr) 342px;gap:0;min-height:calc(100vh - 132px)}
.studio-nav{display:flex;flex-direction:column;gap:5px;padding:20px 12px;background:#101611;border-right:1px solid #34463a;min-width:0}
.nav-title{font-size:.65rem;letter-spacing:.18em;color:#95ab92;font-weight:900;padding:7px 13px}
.studio-nav-button{display:flex;align-items:center;gap:10px;width:100%;min-height:46px;padding:9px 11px;border:1px solid transparent;background:transparent;color:#c9dcc5;border-radius:11px;text-align:left;font-size:.82rem;font-weight:800}
.studio-nav-button:hover{background:#27382b}
.studio-nav-button.active{background:linear-gradient(120deg,#c6ff00,#a7de52);border-color:#c6ff00;color:#17220f;box-shadow:0 0 15px #b8ec302a}
.studio-nav-button .nav-icon{display:inline-grid;place-items:center;min-width:23px;font-size:1.3rem;font-weight:800}
.eyedropper-icon{width:23px;height:23px;flex:none}
.heading-icon{width:28px;height:28px;color:#c6ff00;margin-right:5px;vertical-align:middle}
.studio-nav-button.color-nav:not(.active){border-color:#65784b;color:#daf0bf}
.nav-bottom{display:flex;align-items:center;gap:8px;font-size:.68rem;color:#8cac8b;line-height:1.4;margin-top:auto;padding:14px 8px}
.status-dot{width:8px;height:8px;border-radius:50%;background:#c6ff00;flex:none}
.studio-nav-button.mobile-preview{display:none}
.studio-content{min-width:0;padding:clamp(15px,1.7vw,28px)}
.studio-screen{min-width:0}
.screen-title{display:flex;align-items:end;justify-content:space-between;gap:12px;margin-bottom:17px}
.screen-title h2{font-size:clamp(1.35rem,2vw,1.86rem);line-height:1.15;margin:4px 0 5px;letter-spacing:-.035em}
.screen-title p{font-size:.83rem;color:#a9c2a7;margin:0;max-width:75ch}
.studio-card{min-width:0;border:1px solid #415746;background:linear-gradient(158deg,#1d2920,#17201a);border-radius:17px;padding:clamp(13px,1.45vw,21px);box-shadow:0 9px 28px #0003;margin-bottom:16px}
.studio-card>h3,.studio-card .card-heading h3{font-size:.94rem;margin:0;font-weight:900}
.studio-card>h3{margin-bottom:13px}
.card-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-bottom:12px;margin-bottom:12px;border-bottom:1px solid #38503d}
.products-grid{display:grid;grid-template-columns:minmax(240px,38%) minmax(0,1fr);gap:13px;align-items:start}
.studio-card.product-browser{position:sticky;top:12px}
.section-list,.item-list{display:grid;gap:7px;min-width:0}
.section-button,.item-button{display:flex;align-items:center;gap:8px;min-width:0;text-align:left;background:#203125;color:#e6f3de;border:1px solid #445d49;border-radius:10px;padding:10px 9px;min-height:45px;font-weight:800;width:100%}
.section-button:hover,.item-button:hover{border-color:#92b76d}
.section-button.active,.item-button.active{border-color:#c6ff00;background:#344635;box-shadow:inset 3px 0 0 #c6ff00}
.section-button span:first-child,.item-button span:first-child{min-width:0;overflow-wrap:anywhere}
.section-button small,.item-button small{display:block;font-size:.67rem;font-weight:600;color:#a8bea2}
.section-button>.chevron{margin-left:auto;color:#b5d49b}
.item-button .item-name{flex:1;min-width:0}
.item-button .item-photo{width:36px;height:36px;flex:none;object-fit:cover;border-radius:8px;background:#334333}
.item-button .item-photo.placeholder{display:grid;place-items:center;color:#d8ebbc}
.item-button .item-price{font-size:.72rem;color:#d6f5bd;font-variant-numeric:tabular-nums;white-space:nowrap}
.items-heading{margin-top:17px}
.count-label{background:#334b32;color:#cdeeb4;border-radius:99px;font-size:.7rem;padding:4px 10px}
.product-browser>.studio-btn.block{margin-top:12px}
.empty-state{padding:23px 10px;color:#9db89e;font-size:.79rem;text-align:center;border:1px dashed #527051;border-radius:11px}
.editor-form{display:grid;gap:14px}
.editor-form .card-heading{margin:0}
.small-badge{display:inline-flex;align-items:center;font-size:.66rem;padding:5px 9px;border:1px solid #657e5b;border-radius:999px;color:#d1e6c1;font-weight:800;white-space:nowrap}
.small-badge.active{background:#314f2a;color:#bfff91;border-color:#8dc377}
.studio-card label,.qr-options label{display:grid;gap:6px;color:#d8e9d4;font-size:.76rem;font-weight:800;min-width:0}
label b{color:#eaca7a}
.studio-card label input:not([type=checkbox]),.studio-card label select,.studio-card label textarea{margin-top:0}
.studio-card label textarea{resize:vertical}
.photo-fields{display:grid;grid-template-columns:145px minmax(0,1fr);gap:12px}
.photo-preview{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:8px;aspect-ratio:1/1;border:1px dashed #658560;border-radius:13px;background:#101912;color:#9fbb9c;overflow:hidden}
.photo-preview img{width:100%;height:100%;object-fit:cover}
.photo-preview span{font-size:2.1rem}
.photo-preview small{font-size:.67rem}
.photo-controls{display:grid;align-content:start;gap:8px}
.photo-controls small{color:#a5b7a5;font-size:.69rem}
.upload-control{display:grid;place-items:center;min-height:43px;padding:8px;border:1px dashed #8bad78;border-radius:10px;background:#273829;color:#dfedce;cursor:pointer;text-align:center}
.fields{display:grid;gap:11px;min-width:0}
.fields.two{grid-template-columns:repeat(2,minmax(0,1fr))}
.fields.three{grid-template-columns:repeat(3,minmax(0,1fr))}
.field-hint,.subtle{font-size:.73rem;color:#a9c0a6;line-height:1.5;margin:0}
.switch-row{display:flex;flex-wrap:wrap;gap:10px}
.switch-row label,.switch-line{display:flex!important;align-items:center;gap:7px;font-size:.75rem;font-weight:750;background:#243527;padding:10px 12px;border-radius:10px;cursor:pointer}
.switch-row label input,.switch-line input{flex:none;margin:0}
.form-actions{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap;padding-top:10px;border-top:1px solid #3c5240}
.range-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}
.range-grid label{display:grid;grid-template-columns:1fr auto;align-items:center;gap:8px}
.range-grid label input{grid-column:1/-1}
.range-grid output{font-size:.74rem;color:#c9f69d;font-variant-numeric:tabular-nums}
.theme-presets{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.theme-preset{display:flex;align-items:center;gap:8px;text-align:left;min-height:76px;background:#243327;border:1px solid #577156;border-radius:12px;color:#dfeedd;padding:9px;font-size:.78rem;font-weight:800}
.theme-preset:hover{border-color:#c6ff00}
.preset-art{width:35px;min-width:35px;height:38px;border-radius:7px;background:#151a15;border-left:7px solid #c6ff00}
.preset-art.zine{background:#f1e3ca;border-left-color:#d45242}
.preset-art.minimal{background:#191e24;border-left-color:#94adc3}
.colors-card{display:grid;gap:14px}
.colors-card .card-heading{margin-bottom:0}
.color-input-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.color-input-grid label{display:grid;grid-template-columns:50px minmax(0,1fr);align-items:center;gap:7px}
.color-input-grid label:not(:has(input)){display:none}
.color-input-grid label{font-size:.72rem}
.color-input-grid label input[type=color]{grid-column:1;grid-row:2;width:100%;height:44px}
.color-input-grid label .hex-readout{grid-column:2;grid-row:2;font-size:.73rem;letter-spacing:.03em}
.palette-strip{height:38px;display:flex;border-radius:10px;overflow:hidden;border:1px solid #66815d}
.palette-strip span{flex:1}
.button-row{display:flex;align-items:center;flex-wrap:wrap;gap:9px}
.button-row>label{flex:1 1 180px}
.settings-switches{display:grid;gap:10px}
.settings-switches>label{display:flex;align-items:center;gap:12px;padding:14px;background:#223026;border:1px solid #455d49;border-radius:12px;cursor:pointer}
.settings-switches>label input{flex:none}
.settings-switches>label span{display:grid;gap:3px}
.settings-switches>label small{font-size:.73rem;font-weight:500;color:#acc5aa}
.notice{padding:12px;margin:10px 0 0;border:1px solid #786c4a;border-radius:10px;background:#302a19;color:#e7dfbf;font-size:.75rem}
.publish-summary{font-size:.9rem;display:grid;gap:10px;margin-bottom:15px}
.publish-summary .detail{color:#b8cfad}
.danger-details{margin-top:23px;padding:14px;background:#221d1e;border:1px solid #825b57;border-radius:12px}
.danger-details summary{cursor:pointer;font-weight:900}
.danger-details p{font-size:.74rem;color:#d1b9b5}
.qr-editor{display:grid;grid-template-columns:235px minmax(0,1fr);gap:25px;align-items:start}
.qr-frame{display:grid;place-items:center;width:235px;height:235px;padding:17px;border:1px solid #91b868;border-radius:13px;background:#fff;overflow:hidden}
.qr-frame img,.qr-frame canvas{max-width:100%;height:auto}
.qr-options{display:grid;gap:12px;min-width:0}
.preview-rail{padding:18px 12px;border-left:1px solid #384f3c;background:#111b14;min-width:0;align-self:stretch}
.preview-title{display:flex;justify-content:space-between;align-items:center;gap:8px;margin:0 0 16px}
.preview-title h2{font-size:1.1rem;margin:2px 0 0;letter-spacing:-.025em}
.phone-shell{width:min(100%,305px);aspect-ratio:9/18.9;max-height:640px;margin:0 auto;padding:9px;border-radius:35px;border:4px solid #3b493d;background:#070909;box-shadow:0 13px 40px #0009,0 0 0 1px #748b6f}
.phone-shell iframe{display:block;width:100%;height:100%;border:0;border-radius:25px;background:#131a14}
.preview-actions{display:flex;justify-content:space-between;align-items:center;gap:5px;margin:15px auto 0;width:min(100%,305px);font-size:.7rem;color:#a2bc9f}
.preview-foot{font-size:.74rem;line-height:1.5;color:#9fb39a;text-align:center;max-width:300px;margin:12px auto}
.mobile-preview-screen{display:none}
.mobile-preview-screen:not([hidden]){display:block}
.section-settings{display:grid;gap:11px}
.section-settings-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center;padding:12px;border:1px solid #425743;border-radius:12px;background:#1e2b20}
.section-settings-row label{display:grid;gap:5px}
.section-settings-row .row-actions{display:flex;flex-wrap:wrap;gap:5px}
.section-settings-row .row-actions button{min-width:41px;min-height:41px;border:1px solid #607b60;background:#29402c;border-radius:9px;color:#e7f1df}
.section-settings-row .row-actions button:hover{border-color:#c6ff00}
.section-settings-row .row-actions button.danger{border-color:#9b6262;color:#ffc0b9}
.section-settings-row .switch-line{grid-column:1/-1;width:max-content;max-width:100%}
.access-overlay{position:fixed;inset:0;z-index:9999;background:#070d09eF;display:grid;place-items:center;padding:16px;overflow-y:auto}
.access-card{width:min(100%,440px);display:grid;gap:15px;text-align:left;border:1px solid #728c58;border-radius:20px;padding:clamp(20px,4vw,32px);background:linear-gradient(155deg,#243025,#151d17);box-shadow:0 15px 70px #000a}
.access-card img{width:75px;height:75px;object-fit:cover;border-radius:12px}
.access-card h2{font-size:1.65rem;margin:0;color:#c6ff00}
.access-card p{font-size:.83rem;color:#bfd3b7;margin:0}
.access-card label{display:grid;gap:7px;font-size:.76rem;font-weight:800}
.access-card>a{color:#c6ff00;font-size:.82rem}
.access-card #auth-feedback{color:#ffd0b9}
@media(max-width:1430px){
 .studio-layout{grid-template-columns:176px minmax(0,1fr) 300px}
 .products-grid{grid-template-columns:minmax(210px,39%) minmax(0,1fr)}
 .photo-fields{grid-template-columns:105px minmax(0,1fr)}
}
@media(max-width:1200px){
 .studio-layout{grid-template-columns:158px minmax(0,1fr) 265px}
 .studio-nav{padding:16px 7px}
 .studio-nav-button{font-size:.75rem;padding:9px 7px;gap:7px}
 .products-grid{grid-template-columns:1fr}
 .studio-card.product-browser{position:static}
 .phone-shell{border-radius:29px}
}
@media(max-width:930px){
 .studio-layout{display:block}
 .studio-nav{position:sticky;top:0;z-index:20;flex-direction:row;align-items:center;gap:5px;padding:7px 10px;background:#121c16;overflow-x:auto;scrollbar-width:thin;border-bottom:1px solid #455e44;border-right:0}
 .studio-nav-button{width:auto;flex:none;min-height:43px;white-space:nowrap;padding:8px 10px}
 .studio-nav-button.mobile-preview{display:flex}
 .nav-title,.nav-bottom{display:none}
 .studio-content{padding:15px}
 .preview-rail{display:none}
 .mobile-preview-screen{display:block}
 .mobile-preview-holder{display:grid;place-items:center}
 .mobile-preview-holder .phone-shell{max-width:350px;width:100%;height:min(77vh,640px);aspect-ratio:auto}
 .studio-screen:not([hidden]){display:block}
 .studio-top{align-items:flex-start;flex-wrap:wrap;padding:12px 15px}
 .top-actions{width:100%;justify-content:stretch}
 .top-actions .studio-btn{flex:1}
 .top-status{flex:1;text-align:center}
}
@media(max-width:650px){
 .studio-brand>img{width:43px;height:43px}
 .studio-brand h1{font-size:1.19rem}
 .studio-back{padding:7px;font-size:.71rem}
 .studio-brand{gap:8px}
 .studio-brand>div .eyebrow{font-size:.55rem}
 .studio-brand p{font-size:.65rem}
 .top-actions .studio-btn{font-size:.7rem;padding:8px;min-height:43px}
 .screen-title{align-items:start;flex-direction:column}
 .screen-title .studio-btn{width:100%}
 .products-grid{grid-template-columns:1fr}
 .studio-card{padding:13px;border-radius:14px}
 .fields.two,.fields.three,.range-grid{grid-template-columns:1fr}
 .range-grid{gap:6px}
 .range-grid label{grid-template-columns:1fr auto}
 .photo-fields{grid-template-columns:100px minmax(0,1fr);gap:9px}
 .photo-preview{min-height:100px}
 .photo-controls small{display:none}
 .theme-presets{grid-template-columns:1fr}
 .theme-preset{min-height:52px}
 .color-input-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
 .color-input-grid label{grid-template-columns:40px minmax(0,1fr)}
 .color-input-grid label input[type=color]{height:40px}
 .form-actions .studio-btn{flex:1 1 90px}
 .section-settings-row{grid-template-columns:1fr}
 .section-settings-row .row-actions{justify-content:flex-start}
 .qr-editor{grid-template-columns:1fr}
 .qr-frame{margin:0 auto}
 .mobile-preview-holder .phone-shell{width:min(100%,320px)}
}
@media(max-width:355px){
 .studio-back span{display:none}
 .color-input-grid{grid-template-columns:1fr}
 .photo-fields{grid-template-columns:1fr}
 .photo-preview{max-width:145px}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.studio-btn{transition:none}}
