
:root{color-scheme:light;font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Arial,sans-serif;--ink:#182941;--blue:#235bc2;--line:#e0e7f0;--muted:#6a7a91;--subtle:#f5f8fc}
*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden;background:#fff;color:var(--ink)}
body{display:flex;flex-direction:column;min-width:340px}
.portal-header{display:flex;align-items:center;gap:14px;flex:0 0 auto;min-height:74px;padding:11px clamp(14px,2.1vw,34px);border-bottom:1px solid var(--line);background:#fff;box-shadow:0 1px 4px #1e47700a;z-index:2}
.portal-brand{display:flex;align-items:center;gap:10px;min-width:208px;flex-shrink:0}
.brand-mark{width:42px;height:42px;border-radius:12px;display:grid;place-items:center;background:#eaf1ff;color:var(--blue)}
.brand-mark svg{width:26px;height:26px}
.brand-text{display:flex;flex-direction:column;gap:3px}.brand-text strong{font-weight:750;font-size:15px;letter-spacing:-.3px}.brand-text small{font-size:10px;color:var(--muted);letter-spacing:.08em;text-transform:uppercase;font-weight:650}
.portal-tabs{display:flex;align-items:center;gap:5px;padding:5px;border-radius:13px;background:#f4f7fb;border:1px solid #e7edf5;margin:0 auto;min-width:0}
.portal-tab{display:flex;align-items:center;justify-content:center;gap:9px;white-space:nowrap;padding:12px clamp(12px,1.5vw,23px);text-align:center;text-decoration:none;border-radius:9px;font-weight:680;color:#5a6d86;font-size:13px;line-height:1;transition:color .15s,background .15s,box-shadow .15s}
.portal-tab svg{width:17px;height:17px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linejoin:round;stroke-linecap:round;flex-shrink:0}
.portal-tab:hover{background:#eaf0fa;color:#2858ae}.portal-tab:focus-visible{outline:3px solid #89b7f8;outline-offset:2px}
.portal-tab.is-active{color:#2359ba;background:#fff;box-shadow:0 1px 6px #244c7c22;border:1px solid #dce5f3;margin:-1px}
.portal-meta{display:flex;align-items:center;gap:9px;flex-shrink:0;min-width:142px;justify-content:flex-end}
.local-indicator{display:flex;align-items:center;gap:6px;color:#5f718a;font-size:11px;white-space:nowrap;font-weight:600}
.local-indicator::before{content:"";display:inline-block;width:7px;height:7px;background:#2aaf79;border-radius:99px;box-shadow:0 0 0 3px #e6f7ee}
.help-link{width:33px;height:33px;display:grid;place-items:center;border:1px solid #dde6f0;color:#64758f;border-radius:9px;text-decoration:none;font-size:15px;font-weight:730}.help-link:hover{background:#f1f6fd}
.portal-viewport{min-height:0;min-width:0;position:relative;flex:1;background:#f6f8fc}
.module-frame{position:absolute;inset:0;width:100%;height:100%;border:0;background:#fff;display:block}
.module-frame[hidden]{display:none}
.portal-error{position:absolute;bottom:16px;left:50%;transform:translateX(-50%);color:#a04423;background:#fff4ed;border:1px solid #f4d0bf;border-radius:10px;padding:12px 20px;box-shadow:0 4px 24px #2222;max-width:90%;font-size:12px;text-align:center;z-index:2}
.portal-error[hidden]{display:none}
@media(max-width:950px){.portal-header{gap:8px;padding:10px 14px}.portal-brand{min-width:0}.brand-text strong{font-size:13px}.brand-text small{font-size:9px}.portal-meta{min-width:0}.local-indicator{display:none}.portal-tab{padding:12px 13px;font-size:12px}}
@media(max-width:690px){.portal-header{flex-wrap:wrap;min-height:0;padding:9px 11px 8px}.portal-brand{flex:1}.portal-tabs{order:3;flex:1 0 100%;margin:5px 0 0;justify-content:space-between}.portal-tab{flex:1;padding:11px 6px;gap:5px;font-size:11px}.portal-tab svg{width:15px;height:15px}.portal-meta{min-width:0}.brand-mark{width:34px;height:34px}.brand-mark svg{width:20px}}
@media(max-width:370px){.portal-tab{font-size:10px}.portal-tab svg{display:none}}

/* Quatro módulos com navegação consistente. */
@media(max-width:1170px){.portal-brand{min-width:165px}.portal-tab{padding:11px 10px}.portal-meta{min-width:0}.local-indicator{display:none}}
@media(max-width:690px){.portal-tabs{overflow-x:auto;scrollbar-width:thin}.portal-tab{flex:1 0 auto;min-width:90px}}

/* v1.6.5: o menu acomoda 5 módulos sem truncar a navegação. */
.portal-brand{min-width:175px}
.portal-header{gap:10px}
.portal-tabs{overflow-x:auto;max-width:100%;scrollbar-width:thin;scrollbar-color:#c8d8ec transparent}
.portal-tab{flex:0 0 auto;padding:11px clamp(8px,1vw,16px);font-size:12px;gap:6px}
.portal-tab[data-modulo="conferencia-frequencia"]{min-width:max-content}
@media(max-width:1330px){.portal-brand{min-width:0}.portal-meta{display:none}.portal-tabs{margin-left:auto;max-width:calc(100% - 190px)}}
@media(max-width:850px){.portal-tabs{max-width:calc(100% - 150px)}.portal-tab{padding:10px 9px;font-size:11px}}
@media(max-width:690px){.portal-tabs{max-width:100%;order:3;flex:1 0 100%;margin:5px 0 0;justify-content:flex-start}.portal-tab{min-width:max-content;padding:10px 12px}}
