.headright{position:relative}.account-trigger{display:flex;align-items:center;gap:10px;border:0;background:transparent;padding:5px 7px;border-radius:11px;cursor:pointer;text-align:left;color:var(--text)}.account-trigger:hover,.account-trigger.open{background:#f3f1ff}.account-trigger .avatar{flex:0 0 auto}.avatar img{width:100%;height:100%;object-fit:cover;border-radius:50%}.account-chevron{font-size:10px;color:#8d96aa;transition:.2s}.account-trigger.open .account-chevron{transform:rotate(180deg)}.account-menu{display:none;position:absolute;right:0;top:50px;width:255px;background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:0 18px 55px #17213a25;padding:9px;z-index:80}.account-menu.show{display:block;animation:accountIn .18s ease}.account-summary{display:flex;gap:10px;align-items:center;padding:10px;border-bottom:1px solid var(--line);margin-bottom:6px}.account-summary .avatar{width:42px;height:42px}.account-summary b,.account-summary small{display:block}.account-summary b{font-size:11px}.account-summary small{font-size:9px;color:var(--muted);margin-top:3px}.account-menu a{display:flex;align-items:center;gap:10px;padding:10px 11px;border-radius:8px;text-decoration:none;color:#4b5771;font-size:10px;font-weight:600}.account-menu a:hover{background:#f5f3ff;color:#6546e7}.account-menu a.logout{color:#bc4545;border-top:1px solid var(--line);margin-top:5px;border-radius:0 0 8px 8px}.account-menu a span{font-size:16px;width:18px}.profile-settings{display:grid;grid-template-columns:300px minmax(400px,650px);gap:18px;justify-content:center;margin-top:25px}.profile-card{text-align:center;padding:35px 25px}.profile-photo-large{width:110px;height:110px;border-radius:30px;background:linear-gradient(135deg,#7b60fa,#5b39df);color:#fff;display:grid;place-items:center;margin:0 auto 18px;font-size:30px;font-weight:800;overflow:hidden;box-shadow:0 14px 35px #6546e733}.profile-photo-large img{width:100%;height:100%;object-fit:cover}.profile-card h2{margin:0 0 5px}.profile-card p{font-size:11px;color:var(--muted)}.profile-card>span{display:inline-block;padding:6px 10px;border-radius:20px;background:#ece8ff;color:#6244dd;font-size:9px;font-weight:700}.profile-card>small{display:block;color:var(--muted);font-size:9px;line-height:1.5;margin-top:22px}.profile-form{padding:28px}.profile-form form{display:grid;grid-template-columns:1fr 1fr;gap:14px}.profile-form label{font-size:10px;color:#68728a;font-weight:700}.profile-form label small{font-weight:400}.profile-form input{width:100%;padding:11px;border:1px solid var(--line);border-radius:8px;margin-top:6px}.profile-actions{grid-column:1/-1;display:flex;align-items:center;gap:15px;margin-top:5px}.profile-actions a{color:#bc4545;font-size:10px;text-decoration:none;font-weight:700}@keyframes accountIn{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}
@media(max-width:800px){.profile-settings{grid-template-columns:1fr;margin-top:5px}.profile-card{padding:25px}.profile-form form{grid-template-columns:1fr}.profile-actions{grid-column:auto}.account-menu{position:fixed;top:70px;right:12px;left:12px;width:auto}.account-trigger .username{display:none}.account-chevron{display:none}}

/* 2.2.3: proteções contra CSS antigo/incompleto no cache do PWA. */
.account-menu:not(.show){display:none!important}.account-menu.show{display:block!important}.headright{min-width:0}.account-trigger{max-width:310px}.account-trigger .username{min-width:0}.account-trigger .username b{max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.app header{position:relative;z-index:30}.app main{position:relative;z-index:1}
@media(max-width:600px){.app header>div:nth-child(2){min-width:0}.app header>div:nth-child(2) h2{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.headright{gap:5px}.iconbtn{display:none}.account-menu{max-height:calc(100vh - 90px);overflow:auto}}

/* 2.2.4: navegação unificada e retorno previsível. */
.sidebar nav .nav-section{display:block;color:#626d86;font-size:8px;font-weight:800;letter-spacing:1.2px;padding:13px 13px 4px}.sidebar nav a b{font-size:inherit;font-weight:600;white-space:nowrap}.backbtn{height:38px;border:1px solid var(--line);background:#fff;color:#536079;border-radius:10px;padding:0 11px;display:flex;align-items:center;gap:7px;cursor:pointer;flex:0 0 auto}.backbtn:hover{color:#6546e7;border-color:#d9d2ff;background:#faf9ff}.backbtn span{font-size:18px}.backbtn b{font-size:10px}.header-title{min-width:0;margin-right:auto}.header-title h2{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sidebar-collapsed .nav-section{display:none!important}.sidebar-collapsed .sidebar nav a b{display:none}.sidebar-collapsed .sidebar nav a{gap:0}.sidebar nav a.active{box-shadow:0 8px 20px #0002}.sidebar nav a:focus-visible,.backbtn:focus-visible,.desktop-collapse:focus-visible{outline:3px solid #9b8aff;outline-offset:2px}
@media(max-width:999px){.sidebar nav .nav-section{padding-top:15px}.sidebar nav a b{display:block!important}.backbtn b{display:none}.backbtn{width:38px;justify-content:center;padding:0}.app header{gap:9px}.app header>div:nth-of-type(1){margin-right:auto}}
@media(max-width:480px){.app header h2{font-size:15px}.account-trigger{padding:4px}.account-trigger .avatar{width:34px;height:34px}.backbtn{width:34px;height:34px}.menubtn{width:34px;height:34px}}
