.mobile-flow,.mobile-more-button,.mobile-more-panel,.mobile-menu-shade{display:none}
.toast{pointer-events:none}
@media(max-width:760px){
  body{background:#f5f8fa}.app-header{height:68px;background:#ffffffee}.container{margin-top:68px;padding:23px 16px calc(120px + env(safe-area-inset-bottom))}.page-heading h1{font-size:36px}.page-heading p{font-size:12px}.preview-notice{font-size:11px;padding-bottom:16px}.eyebrow{font-size:9px}.page-heading{margin-bottom:10px}
  .tabs{position:fixed;inset:auto 10px calc(10px + env(safe-area-inset-bottom));height:83px;width:auto;display:flex;justify-content:space-around;align-items:center;gap:0;padding:7px 6px;border:1px solid #ffffffef;border-radius:27px;background:#ffffffed;backdrop-filter:blur(20px);box-shadow:0 7px 32px #17374925;z-index:150;overflow:visible;transition:transform .2s,opacity .2s}.tabs .nav-caption,.tabs .nav-footer{display:none}.tabs .tab,.mobile-more-button{display:flex;flex:1;min-width:0;max-width:70px;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:0;min-height:65px;border:0;background:none;color:#526d7b;font:10px Inter,'Segoe UI',sans-serif;cursor:pointer;border-radius:12px}.tabs .tab svg,.more-orb{box-sizing:content-box;width:20px;height:20px;padding:12px;border-radius:50%;background:#eff4f6;transition:transform .3s cubic-bezier(.2,1.7,.45,1),background .25s,box-shadow .25s;stroke-width:1.7}.tabs .tab:before,.tabs .tab:after{display:none}.tabs .tab.active{color:#154a60;font-weight:600}.tabs .tab.active svg,.mobile-more-button.active .more-orb,.mobile-more-button[aria-expanded=true] .more-orb{background:#214f63;color:#fff;transform:translateY(-5px);box-shadow:0 5px 12px #214f6330}.tabs .tab:active svg,.mobile-more-button:active .more-orb{transform:scale(.88)}.more-orb{display:flex;align-items:center;justify-content:center;font-size:16px;letter-spacing:1px;line-height:1}.mobile-more-button>span:last-child{font-size:10px}.mobile-keyboard .tabs{transform:translateY(130%);opacity:0;pointer-events:none}
  #tab-novo>.cycle-steps,#tab-novo>.mobile-draft{display:none!important}#tab-novo>.cycle-aside{margin-bottom:14px}.mobile-flow{display:block;min-width:0;scroll-margin-top:82px}.mobile-step-cards{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-bottom:18px}.mobile-step-cards button{min-width:0;display:flex;align-items:center;gap:9px;text-align:left;border:1px solid #dde7eb;border-radius:13px;background:white;padding:12px 10px;min-height:71px;color:#5b7684;cursor:pointer;transition:background .2s,border-color .2s,transform .2s}.mobile-step-cards button.active{background:#e9f3f7;border-color:#6997aa;box-shadow:0 3px 9px #214f6308}.mobile-step-cards button:active{transform:scale(.97)}.step-orb{flex-shrink:0;width:26px;height:26px;display:grid;place-items:center;border-radius:50%;background:#f0f5f7;font-size:11px}.active>.step-orb{background:#214f63;color:#fff}.mobile-step-cards strong{font-size:12px;font-weight:600;display:block}.mobile-step-cards small{display:block;font-size:10px;margin-top:4px;line-height:1.3;color:#6b8592}.mobile-stage-label{font-size:12px;color:#597886;margin:0 2px 12px}.mobile-stage{background:white;border:1px solid #e0e8ed;box-shadow:0 4px 15px #214f6305;border-radius:18px;padding:18px 15px;min-width:0;animation:mobile-stage-in .25s ease-out}.mobile-stage[hidden]{display:none!important}.mobile-stage>.card{padding:0;margin:0 0 22px;border:0;border-radius:0;box-shadow:none}.mobile-stage>.card:last-child{margin-bottom:0}.mobile-stage .section-caption{display:none}.mobile-stage .card-title{font-size:17px;margin-bottom:17px}.mobile-stage #setup-program{border-top:1px solid #e2e9ec;padding-top:20px;margin-top:20px}.mobile-stage .autoclave-picker{gap:9px}.mobile-stage .autoclave-btn{padding:13px 10px;min-height:165px}.mobile-stage .machine-code{font-size:8px;padding-right:12px}.mobile-stage .machine-capacity{font-size:49px;margin-top:21px;margin-bottom:12px}.mobile-stage .ac-name{font-size:12px}.mobile-stage .ac-info{font-size:10px}.mobile-stage .autoclave-btn:before{right:10px;top:11px}.mobile-stage .cycle-readout>div{padding:0 10px}.mobile-stage .cycle-readout>div:first-child{padding-left:0}.mobile-stage .cycle-readout strong{font-size:28px}.mobile-stage .form-row{grid-template-columns:1fr}.mobile-stage .field input,.mobile-stage .field select,.mobile-stage .field textarea{font-size:16px;min-height:48px}.mobile-stage .radio-option{min-height:46px;padding:11px 10px}.mobile-stage .photo-label{min-height:96px}.mobile-stage #card-bio{padding-top:24px;border-top:1px solid #e2e9ec}.mobile-stage .surgery-toggle{padding:13px}.mobile-stage #save-log:empty{display:none}.mobile-flow-actions{display:flex;justify-content:space-between;gap:12px;padding:16px 0 4px}.mobile-flow-actions button{min-height:49px;border-radius:12px;padding:12px 20px;border:1px solid #d4e2e9;background:#fff;color:#345d70;font:14px Inter,sans-serif;cursor:pointer}.mobile-flow-actions .mobile-next{margin-left:auto;min-width:57%;display:flex;justify-content:space-between;align-items:center;background:#214f63;border-color:#214f63;color:#fff}.mobile-flow-actions button[hidden]{display:none}.mobile-field-error{font-size:13px;color:#a13340;padding:12px 3px 0}.field [aria-invalid=true]{border-color:#b64653;box-shadow:0 0 0 3px #b6465310}
  .mobile-more-panel:not([hidden]){display:block;position:fixed;z-index:180;bottom:calc(105px + env(safe-area-inset-bottom));left:16px;right:16px;padding:18px;background:#fff;border-radius:21px;box-shadow:0 15px 50px #102f4030;animation:mobile-stage-in .2s ease-out}.mobile-more-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px;font-size:16px;color:#294d5e}.mobile-more-heading button{border:0;background:#f0f5f7;border-radius:50%;width:44px;height:44px;font-size:25px;color:#486775;cursor:pointer}.mobile-more-panel .tab{width:100%;min-height:52px;font-size:14px;gap:15px;border-radius:10px}.mobile-more-panel .tab.active:after{display:none}.mobile-menu-shade:not([hidden]){display:block;position:fixed;inset:0;z-index:160;background:#16354350;backdrop-filter:blur(3px)}.toast{bottom:calc(108px + env(safe-area-inset-bottom))}.detail-sheet{padding-bottom:calc(26px + env(safe-area-inset-bottom))}.detail-overlay{z-index:210}
  @keyframes mobile-stage-in{from{opacity:.25;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}
}
@media(max-width:360px){.mobile-step-cards strong{font-size:11px}.mobile-step-cards small{font-size:9px}.mobile-step-cards button{padding:10px 8px;gap:7px}.mobile-stage{padding:16px 12px}.mobile-stage .ac-name{font-size:11px}.mobile-stage .machine-code{font-size:7px}.mobile-stage .ac-info{font-size:9px}.tabs{left:7px;right:7px;padding-left:3px;padding-right:3px}}
@media(prefers-reduced-motion:reduce){.mobile-stage,.mobile-more-panel{animation:none!important}.tabs .tab svg,.more-orb,.mobile-step-cards button{transition:none!important}}
/* Fixed flow actions remain separate from the main navigation dock. */
@media(max-width:760px){
 .container{padding-bottom:calc(205px + env(safe-area-inset-bottom))}
 .mobile-flow-actions{position:fixed;left:16px;right:16px;bottom:calc(105px + env(safe-area-inset-bottom));z-index:140;background:#fffffff5;backdrop-filter:blur(16px);border:1px solid #dce7ed;box-shadow:0 4px 20px #17374912;border-radius:16px;padding:8px;gap:8px}
 .mobile-flow-actions .mobile-next{flex:1;min-width:0}
 .mobile-flow-actions #btn-salvar{flex:1;width:auto;min-height:49px;border-radius:12px;margin:0;font-size:14px}
 .mobile-flow-actions #btn-salvar[hidden]{display:none!important}
 .mobile-step-cards .completed .step-orb{background:#dbeee5;color:#22664b;font-weight:700}
 .mobile-step-cards .completed.active .step-orb{background:#22664b;color:white}
 .toast{bottom:calc(183px + env(safe-area-inset-bottom))}
 .mobile-keyboard .mobile-flow-actions{position:static;margin-top:16px;box-shadow:none}
 .mobile-stage input,.mobile-stage select,.mobile-stage textarea{scroll-margin-bottom:200px}
}
/* Clear stage hierarchy and readable pending actions. */
@media(max-width:760px){
 .mobile-step-cards button{min-height:82px;padding:13px 11px;border-color:#bacdd7;color:#264858}
 .mobile-step-cards strong{font-size:14px;line-height:1.25;font-weight:650}
 .mobile-step-cards small{font-size:12px;line-height:1.35;color:#466371}
 .mobile-step-cards .step-orb{width:29px;height:29px;font-size:13px;font-weight:600;color:#345361;background:#e8eff3}
 .mobile-step-cards button.active{background:#214f63;border-color:#214f63;box-shadow:0 4px 12px #214f6320;color:#fff}
 .mobile-step-cards button.active small{color:#e2edf2}
 .mobile-step-cards button.active .step-orb{background:#fff;color:#214f63}
 .mobile-step-cards button.completed:not(.active){background:#edf7f1;border-color:#91bda5}
 .mobile-step-cards .completed .step-orb{background:#d2e9dc;color:#1b5c3b}
 .mobile-stage-label{font-size:14px;font-weight:600;color:#284c5d;margin:0 2px 14px}
 .mobile-stage .field label{font-size:14px;color:#294b5a;font-weight:550}
 .mobile-flow-actions{flex-wrap:wrap}
 .mobile-pending-hint{flex:0 0 100%;font-size:12px;line-height:1.4;font-weight:500;color:#3e5966;margin:0;padding:3px 5px 0}
 .mobile-pending-hint[hidden]{display:none}
 .mobile-flow-actions .mobile-next:disabled{background:#e3eaf0;border-color:#c5d2dc;color:#536876;cursor:not-allowed;box-shadow:none;opacity:1}
 .container{padding-bottom:calc(239px + env(safe-area-inset-bottom))}
 .mobile-stage input,.mobile-stage select,.mobile-stage textarea{scroll-margin-bottom:240px}
}
@media(max-width:360px){
 .mobile-step-cards button{padding:12px 8px;gap:7px}
 .mobile-step-cards .step-orb{width:24px;height:24px;font-size:12px}
 .mobile-step-cards strong{font-size:13px}
 .mobile-step-cards small{font-size:11px}
}
