/* ===== acesso, carregamento, empresa ativa e permissões ===== */
body.locked .app{display:none}
#auth{min-height:100vh;display:grid;place-items:center;padding:24px 0}
.auth-card{width:min(420px,100%);background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:28px;display:flex;flex-direction:column;gap:14px;box-shadow:0 20px 50px rgba(15,19,68,.12)}
.auth-card h1{font-size:24px}.auth-card>p{color:var(--muted);margin-top:-6px}
.auth-brand{display:flex;flex-direction:column;gap:2px;margin-bottom:6px}
.auth-brand b{font-family:var(--f-display);font-size:26px;letter-spacing:-.02em}.auth-brand b i{font-style:normal;color:var(--accent)}
.auth-brand span{color:var(--muted);font-size:12px}
#auth-f{display:flex;flex-direction:column;gap:12px}
.auth-links{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap}
.lnk{font:inherit;font-size:13px;color:var(--accent);background:none;border:0;padding:0;cursor:pointer;text-decoration:underline;text-underline-offset:3px}
#app-load{position:fixed;inset:0;z-index:90;display:grid;place-items:center;background:color-mix(in srgb,var(--bg) 78%,transparent);backdrop-filter:blur(2px)}
#app-load[hidden]{display:none}
#app-load>div{display:flex;align-items:center;gap:12px;background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:14px 18px;box-shadow:0 10px 30px rgba(15,19,68,.15)}
.spin{width:18px;height:18px;border-radius:50%;border:2.5px solid var(--line);border-top-color:var(--accent);animation:spin .8s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.spin{animation-duration:3s}}
.tenant{display:flex;flex-direction:column;gap:10px}
.tn-emp{display:flex;flex-direction:column;gap:2px}.tn-emp small{color:var(--muted);font-size:11px}.tn-emp b{font-size:14px}
.tn-user{display:flex;flex-direction:column;gap:1px;border-top:1px solid rgba(255,255,255,.1);padding-top:10px;min-width:0}
.tn-user span{font-weight:600;font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tn-user small{color:var(--muted);font-size:11px}
.tn-foot{display:flex;justify-content:space-between;align-items:center;gap:8px}
.tn-foot .btn{padding:4px 10px}
.tn-demo{color:#F0B35B;font-size:11px}
.sync{font-size:11.5px;color:var(--muted);display:inline-flex;align-items:center;gap:6px}
.sync::before{content:"";width:7px;height:7px;border-radius:50%;background:#5AD08F}
.sync.salvando::before{background:#F0B35B}.sync.erro{color:#FF8A80;cursor:pointer;text-decoration:underline}.sync.erro::before{background:#FF8A80}.sync.leitura::before{background:#8FB0FF}
.nav a em{margin-left:auto;font-style:normal;font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;padding:1px 6px;border-radius:99px;background:rgba(255,255,255,.1);white-space:nowrap}
.ro-banner{border-left-color:var(--info)}
[aria-disabled="true"]{cursor:not-allowed}
.pm{display:flex;flex-direction:column;gap:10px;max-height:52vh;overflow:auto;padding-right:4px}
.pm-top{display:flex;gap:6px;align-items:center;flex-wrap:wrap;font-size:12.5px;color:var(--muted)}
.pm-sec{border:1px solid var(--line);border-radius:10px;padding:8px 10px}
.pm-h{display:flex;justify-content:space-between;gap:8px;align-items:center;font-size:12px;margin-bottom:4px;flex-wrap:wrap}
.pm-h b{text-transform:uppercase;letter-spacing:.06em;font-size:11px;color:var(--muted)}
.pm-row{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:5px 0;border-top:1px dashed var(--line);font-size:13px}
.pm-row:first-of-type{border-top:0}
.pm-row .seg button{padding:3px 10px;font-size:12px}
body.pub .side{display:none}body.pub .app{grid-template-columns:minmax(0,1fr)}
@media print{#app-load,#auth{display:none!important}}
@media (min-width:861px){.side{max-height:calc(100vh - 40px);overflow-y:auto;scrollbar-width:thin}}
