.app{min-height:calc(100vh - 78px);width:100%;max-width:none}
.app-header{display:flex;align-items:center;gap:24px;max-width:1160px;margin:auto;padding:18px 24px;border-bottom:1px solid var(--line);background:#fff}
.app-brand img{display:block;width:150px;height:48px;object-fit:contain}.app-brand[data-logo-error]::after{content:'MANTYX';font-weight:800;color:var(--deep)}
.app-context{margin-left:auto;display:flex;flex-direction:column;font-size:13px}.app-context-label{color:var(--muted);font-size:11px}.app-context strong{font-size:14px}.app-header .app-menu{order:2;flex:1;margin:0;border:0;padding:0}.app-header .app-identity{order:3}.app-header .app-brand{order:1}
.app-toolbar{display:flex;justify-content:space-between;align-items:center;max-width:1160px;margin:auto;padding:42px 24px 24px}
.app-toolbar h1{margin:8px 0 0;font-size:42px;letter-spacing:-.06em}
.app-identity{display:flex;align-items:center;gap:14px;font-weight:800}
.app-menu{max-width:1160px;margin:0 auto 38px;border-top:1px solid var(--line);padding:14px 24px}
.mobile-menu-toggle,.mobile-menu-backdrop{display:none}
body.app-mode main{display:none}
body.app-mode .topbar{position:sticky}
body.app-mode .public-nav>a{display:none}
body.app-mode .public-nav{gap:10px}
.app-menu .menu-group>button:focus-visible,.app-menu .dropdown button:focus-visible,.mobile-menu-toggle:focus-visible{outline:3px solid #65b99b;outline-offset:2px}
@media(max-width:760px){.app-header{padding:14px 24px;gap:12px}.app-brand img{width:128px;height:42px}.app-context,.app-header .app-identity{display:none}.app-header .app-menu{display:none}.mobile-menu-toggle{display:block;position:absolute;right:24px;top:18px;border:1px solid var(--line);background:#fff;color:var(--deep);padding:11px 15px;border-radius:8px;font:inherit;font-weight:700;z-index:7}.app-menu{position:fixed;top:0;right:0;bottom:0;width:min(86vw,340px);margin:0;padding:88px 24px 24px;background:#fff;z-index:8;transform:translateX(105%);transition:transform .2s ease;overflow-y:auto;display:block;border:0;box-shadow:-12px 0 30px #0d3b2e18}.menu-open .app-menu{transform:translateX(0)}.menu-open .mobile-menu-backdrop{display:block;position:fixed;inset:0;background:#0d3b2e66;z-index:7}.app-menu .menu-group{margin-bottom:8px}.app-menu .menu-group>button{width:100%;text-align:left;padding:14px}.app-menu .dropdown{position:static;display:grid;box-shadow:none;border:0;padding:0 0 8px 14px}.app-menu .menu-group:hover .dropdown{display:grid}.app-menu .button{width:100%;margin-top:16px}}

/* O header autenticado ocupa a viewport inteira; somente o conteúdo é limitado. */
.app{padding:0 0 80px;background:#f0f6f2}
.app-header{width:100%;max-width:none;margin:0;padding:16px clamp(20px,4vw,56px);display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:clamp(18px,3vw,44px);border-bottom:1px solid var(--line);box-shadow:0 2px 12px #0d3b2e0d}
.app-brand{min-width:0}.app-brand img{width:150px;height:48px;object-fit:contain}.app-header .app-menu{min-width:0;max-width:none;margin:0;padding:0;border:0;display:flex;justify-content:center;gap:4px;overflow:visible}.app-header .app-identity{white-space:nowrap}.app-context{position:absolute;top:82px;left:0;width:100%;padding:12px clamp(20px,4vw,56px);background:#f7faf8;border-bottom:1px solid var(--line);margin:0;flex-direction:row;gap:10px;align-items:center}.app-header+.app-context{display:none}.app > .app-head,.app > .dashboard-panel,.app > .cards,.app > #professional-form{width:min(100% - 48px,1280px);margin-left:auto;margin-right:auto}.app > .app-head{padding-top:70px}.app-header .menu-group>button{white-space:nowrap}.app-header .dropdown{top:48px;z-index:20}
@media(max-width:1100px) and (min-width:761px){.app-header{gap:16px;padding-left:24px;padding-right:24px}.app-brand img{width:128px}.app-header .app-menu{justify-content:flex-start;overflow-x:auto}.app-header .app-identity{font-size:13px}}
@media(max-width:760px){.app{padding-bottom:48px}.app-header{padding:12px 20px;display:flex;min-height:68px;gap:12px}.app-brand img{width:130px;height:42px}.app-context{display:none}.app-header .app-identity{display:flex;margin-left:auto}.app-header .app-identity span{max-width:92px;overflow:hidden;text-overflow:ellipsis}.app-header .app-menu{display:block;position:fixed;top:0;right:0;bottom:0;width:min(88vw,360px);padding:88px 24px 24px;background:#fff;z-index:8;transform:translateX(105%);transition:transform .2s ease;overflow-y:auto;box-shadow:-12px 0 30px #0d3b2e18}.menu-open .app-header .app-menu{transform:translateX(0)}.app > .app-head,.app > .dashboard-panel,.app > .cards,.app > #professional-form{width:calc(100% - 32px)}.app > .app-head{padding-top:36px}.mobile-menu-toggle{display:block;position:static;margin-left:auto;order:3}.app-header .menu-group{margin-bottom:8px}.app-header .menu-group>button{width:100%;text-align:left;padding:14px}.app-header .dropdown{position:static;display:grid;box-shadow:none;border:0;padding:0 0 8px 14px}.app-header .menu-group:hover .dropdown{display:grid}.app-header .app-menu .dropdown button{width:100%}.app-header .app-menu .menu-group[data-system-menu]{display:block}.app-header .app-menu .button{width:100%;margin-top:16px}}
