body{font-family:'Source Sans 3',sans-serif}.login-shell{min-height:100vh;display:grid;grid-template-columns:1.05fr .95fr}.login-showcase{position:relative;overflow:hidden;display:flex;align-items:center;padding:clamp(2rem,6vw,6rem);color:#fff;background:linear-gradient(145deg,#0b5ed7,#084298 52%,#052c65)}.login-showcase:before,.login-showcase:after{content:'';position:absolute;border-radius:50%;background:#ffffff14}.login-showcase:before{width:420px;height:420px;right:-160px;top:-130px}.login-showcase:after{width:280px;height:280px;left:-110px;bottom:-120px}.showcase-content{position:relative;z-index:1;max-width:620px}.brand-mark{display:inline-flex;padding:.85rem 1rem;border-radius:22px;background:#ffffff1f}.showcase-logo{height:40px;width:auto}.login-area{display:flex;align-items:center;justify-content:center;padding:clamp(1.25rem,5vw,4rem);background:var(--bs-tertiary-bg)}.login-panel{width:100%;max-width:440px}.login-card{border:1px solid var(--bs-border-color);border-top:3px solid var(--bs-primary);border-radius:1rem;box-shadow:0 1rem 3rem #0000001a}.login-card .card-body{padding:2.5rem}.login-card .form-control,.login-card .input-group-text{min-height:48px}.auth-brand-wrap{display:inline-flex;padding:.7rem .9rem;border-radius:1rem;background:#111827}.auth-brand-logo{height:28px;max-width:220px}.security-note{border-radius:.75rem;background:var(--bs-primary-bg-subtle);color:var(--bs-primary-text-emphasis)}.sidebar-brand{background:#111827}.sidebar-brand img{max-width:180px;height:30px;object-fit:contain}.app-main{padding-bottom:2rem}.table td{vertical-align:middle}.page-form{max-width:760px}.empty-state{padding:3rem;text-align:center;color:var(--bs-secondary-color)}@media(max-width:900px){.login-shell{display:block}.login-showcase{display:none}.login-area{min-height:100vh;padding:1rem}.login-card .card-body{padding:1.5rem}}@media(max-width:480px){.showcase-logo{max-width:100%}.auth-brand-logo{max-width:100%;height:auto;max-height:28px}}
.ipma-login-logo{display:block;width:245px;max-width:85%;height:auto;min-height:40px}.ipma-wordmark img{width:290px;max-width:100%;height:auto}.ipma-pill-row{display:flex;flex-wrap:wrap;gap:.7rem}.ipma-pill-row span{padding:.6rem .85rem;background:#ffffff14;border:1px solid #ffffff2b;border-radius:30px;font-size:.9rem}.ipma-institutional{display:inline-block;margin-top:3rem;color:#fff;text-decoration:none;opacity:.8}.ipma-institutional:hover{color:#fff;opacity:1}.login-showcase .display-5{font-size:clamp(2.3rem,3.3vw,3.8rem);line-height:1.13}.login-panel{max-width:470px}.login-card .card-body{padding:2rem}.login-area{padding:clamp(1.25rem,3.5vw,4rem)}.welcome-card{border-top:3px solid var(--bs-primary)}[data-bs-theme=dark] .ipma-login-logo{background:#fff;border-radius:8px;padding:8px}@media(max-width:900px){.ipma-login-logo{width:215px}.login-card .card-body{padding:1.5rem}}
.ipma-login-logo,[data-bs-theme=dark] .ipma-login-logo{background:#084298;border-radius:12px;padding:12px 18px;width:265px}.ipma-wordmark img{width:300px;image-rendering:auto}.sidebar-brand img{height:40px;width:auto}
.ipma-wordmark img,.sidebar-brand img{filter:brightness(0) invert(1)}.ipma-login-logo{background:transparent;padding:0;border-radius:0;width:240px}[data-bs-theme=dark] .ipma-login-logo{background:transparent;filter:brightness(0) invert(1);padding:0}
.ipma-wordmark img{width:250px;max-width:100%;height:auto}.ipma-login-logo{width:220px;min-height:0}.sidebar-brand img{height:auto;max-width:155px}
.ipma-wordmark img{width:460px;max-width:100%;height:auto}.ipma-login-logo{width:330px;max-width:100%}
.sgi-sidebar-profile{margin:.5rem .5rem 1rem;padding:1rem .5rem;border-bottom:1px solid #ffffff1a;color:#fff}.sgi-sidebar-profile .small{font-size:.65rem;letter-spacing:.08em}.sgi-pending{width:100%;text-align:left;background:transparent;border:0;opacity:.72!important;cursor:default}.sidebar-menu .sgi-pending p{white-space:normal;font-size:.9rem}.sidebar-menu .nav-header{font-size:.65rem;letter-spacing:.08em;color:#a8b7c6;padding-top:1rem}.sgi-profile-badge{color:var(--bs-primary-text-emphasis);background:var(--bs-primary-bg-subtle)}.sgi-profile-selection{max-width:650px;border-top:3px solid var(--bs-primary)}.sgi-home-welcome{border:1px solid var(--bs-border-color);border-top:3px solid var(--bs-primary);box-shadow:0 .3rem 1rem #00000005}.sgi-home-symbol{font-size:5rem;color:var(--bs-primary);opacity:.18}.sgi-module-icon{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;border-radius:12px;background:var(--bs-primary-bg-subtle);color:var(--bs-primary);font-size:1.35rem}.sgi-module-card{box-shadow:none;border:1px solid var(--bs-border-color)}.login-card button:disabled{opacity:.7}.login-card .btn-link:disabled{color:var(--bs-primary)}.app-main{padding-bottom:2rem}
/* Estrutura persistente: apenas o conteúdo central e o menu lateral rolam. */
body.sgi-shell{height:100vh;height:100dvh;overflow:hidden}
body.sgi-shell .app-wrapper{height:100%;min-height:0;overflow:hidden;grid-template-rows:auto minmax(0,1fr) auto}
body.sgi-shell .app-main{min-height:0;min-width:0;overflow:auto;overscroll-behavior-y:contain;scrollbar-gutter:stable}
body.sgi-shell .app-header,body.sgi-shell .app-footer{position:relative;flex-shrink:0;z-index:1030}
body.sgi-shell .app-sidebar{height:100vh;height:100dvh;min-height:0;display:flex;flex-direction:column}
body.sgi-shell .sidebar-brand{flex:0 0 auto}
body.sgi-shell .sidebar-wrapper{flex:1;min-height:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior-y:contain}
/* Login ajustado à altura disponível, sem rolagem da página. */
body.sgi-login{height:100vh;height:100dvh;overflow:hidden}
.sgi-login .login-shell{height:100%;min-height:0}
.sgi-login .login-area{height:100%;min-height:0;padding:clamp(.5rem,2vh,2rem) clamp(1rem,3vw,3rem)}
.sgi-login .login-panel>.mb-4{margin-bottom:clamp(.4rem,1.5vh,1rem)!important}
.sgi-login .login-card{margin-bottom:0}
.sgi-login .login-card .card-body{padding:clamp(.8rem,2vh,1.5rem)}
.sgi-login .login-panel .mb-4{margin-bottom:clamp(.6rem,1.7vh,1.1rem)!important}
.sgi-login .login-panel .mb-3{margin-bottom:clamp(.5rem,1.4vh,.9rem)!important}
.sgi-login .login-panel .mt-4{margin-top:clamp(.5rem,1.5vh,1rem)!important}
.sgi-login .login-panel .pt-3{padding-top:clamp(.5rem,1.2vh,.85rem)!important}
.sgi-login .login-panel .mt-3{margin-top:clamp(.4rem,1.2vh,.8rem)!important}
.sgi-login .login-panel h2{font-size:clamp(1.15rem,2.7vh,1.65rem)}
.sgi-login .login-card .form-control,.sgi-login .login-card .input-group-text{min-height:clamp(36px,5.6vh,48px)}
.sgi-login .login-panel>p:last-child{margin-bottom:0}
@media(max-height:700px){.sgi-login .ipma-login-logo{width:250px}.sgi-login .login-card .form-label{margin-bottom:.25rem}.sgi-login .login-panel .small{font-size:.78rem}.sgi-login .btn-lg{padding:.45rem 1rem;font-size:1rem}.sgi-login .login-showcase{padding:2rem 3rem}.sgi-login .login-showcase .ipma-wordmark{margin-bottom:1.5rem!important}.sgi-login .login-showcase .display-5{font-size:2.4rem}.sgi-login .login-showcase .fs-5{font-size:1rem!important}.sgi-login .ipma-institutional{margin-top:1.5rem}}
@media(max-height:580px){.sgi-login .ipma-login-logo{width:190px}.sgi-login .login-panel .mt-4,.sgi-login .login-panel .mt-3{margin-top:.35rem!important}.sgi-login .login-panel .mb-3,.sgi-login .login-panel .mb-4{margin-bottom:.4rem!important}.sgi-login .login-card .card-body{padding:.7rem 1rem}.sgi-login .login-panel>p{margin-top:.3rem!important}.sgi-login .login-panel h2{font-size:1.1rem}.sgi-login .login-panel .form-control,.sgi-login .login-panel .input-group-text{min-height:32px;padding-top:.25rem;padding-bottom:.25rem}}
.sgi-public-shell .app-wrapper{grid-template-areas:"lte-app-header" "lte-app-main" "lte-app-footer";grid-template-columns:minmax(0,1fr)}
.registration-width{max-width:1120px}.registration-brand img{display:block;width:150px;height:40px;object-fit:contain}.registration-card{border:1px solid var(--bs-border-color);box-shadow:none;margin-bottom:1.25rem}.registration-card .card-header{background:transparent}.registration-card .form-control,.registration-card .form-select{min-height:44px}[data-bs-theme=dark] .registration-brand img{filter:brightness(0) invert(1)}
/* Padrão das páginas: título fora da área rolável. */
body.sgi-shell .app-main{display:flex;flex-direction:column;overflow:hidden;padding-bottom:0;scrollbar-gutter:auto}
body.sgi-shell .app-content-header{flex:0 0 auto;margin:0;background:var(--bs-tertiary-bg);border-bottom:1px solid var(--bs-border-color);padding-top:1rem;padding-bottom:1rem}
body.sgi-shell .app-content{flex:1 1 0;min-height:0;overflow:auto;overscroll-behavior-y:contain;scrollbar-gutter:stable;padding-top:1rem;padding-bottom:2rem}
body.sgi-public-shell .registration-page-heading{padding-top:1.5rem;padding-bottom:1.25rem}
body.sgi-public-shell .app-content{padding:0}
@media(max-height:600px){body.sgi-public-shell .registration-page-heading{padding-top:.6rem;padding-bottom:.6rem}body.sgi-public-shell .registration-page-heading h1{font-size:1.35rem;margin-top:.25rem!important}}
.certification-table{min-width:1250px;font-size:.9rem}.certification-table th{white-space:nowrap;font-size:.8rem;color:var(--bs-secondary-color);padding-top:1rem;padding-bottom:1rem}.certification-table td{padding-top:1rem;padding-bottom:1rem}.certification-status{white-space:normal;text-align:left;line-height:1.4;max-width:240px}.certification-info dt,.certification-info dd{padding-bottom:.75rem}.certification-info dd{overflow-wrap:anywhere}
/* Paginação de todas as listagens alinhada à direita. */
.sgi-shell .card-footer:has(.pagination){display:flex;flex-wrap:wrap;align-items:center;gap:1rem}
.sgi-shell .card-footer:has(.pagination)::after{display:none}
.sgi-shell .card-footer nav:has(.pagination),.sgi-shell .card-footer>.pagination{margin-inline-start:auto;flex:0 0 auto}
.sgi-shell .pagination{justify-content:flex-end}
.journey-step{display:block;padding:.45rem .75rem;font-size:.875rem;line-height:1.35;text-decoration:none;min-height:34px}
a.journey-step:hover{filter:brightness(.96);text-decoration:none}
/* Espaçamento compartilhado de cartões e ações dos formulários. */
.sgi-shell .app-content .card,.sgi-public-shell .app-content .card{margin-bottom:1.25rem}
.sgi-form-actions{margin-top:1.25rem;padding-bottom:.5rem;gap:1rem;flex-wrap:wrap}
.journey-step.bg-info,.journey-step.bg-info:hover,.journey-step.bg-info:focus{color:#052c65}
a.journey-step:focus-visible{outline:3px solid var(--bs-primary);outline-offset:2px}

/* Cores dos status conforme o SGI .NET. */
.text-bg-sgi-status-1{background-color: #0000FF;color:white;}
.text-bg-sgi-status-2{background-color: #000080;color:white;}
.text-bg-sgi-status-3{background-color: #FA8072;color:white;}
.text-bg-sgi-status-4{background-color: #2E86C1;color:white;}
.text-bg-sgi-status-5{background-color: #A9CCE3;
    color: black;}
.text-bg-sgi-status-6{background-color: #FFFF00;color:white;}
.text-bg-sgi-status-7{background-color: #0000FF;color:white;}
.text-bg-sgi-status-8{background-color: #2C3E50;color:white;}
.text-bg-sgi-status-9{background-color: #0C29F8;color:white;}
.text-bg-sgi-status-10{background-color: #0C29F8;color:white;}
.text-bg-sgi-status-11{background-color: #FFFF00;
    color: black;}
.text-bg-sgi-status-12{background-color: #FFFF00;
    color: black;}
.text-bg-sgi-status-13{background-color: #808000;color:white;}
.text-bg-sgi-status-14{background-color: #0C29F8;color:white;}
.text-bg-sgi-status-15{background-color: #0C29F8;color:white;}
.text-bg-sgi-status-16{background-color: #0000FF;color:white;}
.text-bg-sgi-status-17{background-color: #A9CCE3;
    color: black ;}
.text-bg-sgi-status-18{background-color: red;
    color: white;}
.text-bg-sgi-status-19{background-color: #CA3D1E;color:white;}
.text-bg-sgi-status-20{background-color: green;color:white;}
.text-bg-sgi-status-20{background-color: green;color:white;}
.text-bg-sgi-status-21{background-color: #F8DB0C;
    color: black;}
.text-bg-sgi-status-22{background-color: #F8DB0C;
    color: black;}
.text-bg-sgi-status-23{background-color: #F8DB0C;
    color: black;}
.text-bg-sgi-status-24{background-color: #F8DB0C;
    color: black;}
.text-bg-sgi-status-25{background-color: #F8DB0C;
    color: black;}
.text-bg-sgi-status-26{background-color: #F8DB0C;
    color: black;}
.text-bg-sgi-status-27{background-color: #F8DB0C;
    color: black;}
.text-bg-sgi-status-28{background-color: red;
    color: white;}
.text-bg-sgi-status-30{background-color: brown;
    color: white;}
.text-bg-sgi-status-29{background-color: orangered ;
    color: white;}
.text-bg-sgi-status-31{background-color: red ;
    color: white;}
.text-bg-sgi-status-32{background-color: red ;
    color: white;}

@media(max-width:575.98px){
.certification-toolbar{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));justify-content:stretch!important;gap:.5rem!important}
.certification-toolbar>.btn{min-width:0;width:100%;white-space:normal;display:flex;align-items:center;justify-content:center;font-size:.85rem;line-height:1.3;padding:.6rem .5rem}
.certification-toolbar>.btn:nth-child(2),.certification-toolbar>.btn:nth-child(3){grid-column:1/-1}
.certification-toolbar>.btn:first-child{grid-column:1/-1}
#advanced-search .card-body{padding:1rem}#advanced-search .form-label{font-size:.9rem}
}
/* O PNG oficial tem margem interna à esquerda (61 de 300 px). */
.sgi-login{--login-card-inset:clamp(.8rem,2vh,1.5rem)}
.sgi-login .login-card .card-body{padding:var(--login-card-inset)}
.sgi-login .ipma-wordmark img{display:block;transform:translateX(-20.333333%)}
.sgi-login .ipma-login-logo{transform:translateX(-20.333333%);margin-left:var(--login-card-inset)}
@media(max-height:580px){.sgi-login{--login-card-inset:1rem}.sgi-login .login-card .card-body{padding:.7rem var(--login-card-inset)}}
/* Padrão dos CRUDs: cabeçalho, comandos e filtros fixos; somente a tabela rola. */
body.sgi-crud-list .app-content{overflow:hidden;padding-bottom:1rem}
body.sgi-crud-list .app-content>.container-fluid{height:100%;min-height:0;display:flex;flex-direction:column}
.sgi-crud-toolbar{flex:0 0 auto}
body.sgi-crud-list .sgi-crud-toolbar .card{margin-bottom:1rem}
body.sgi-crud-list .sgi-crud-table{flex:1 1 0;min-height:0;margin-bottom:0}
.sgi-crud-table>.card-header,.sgi-crud-table>.card-footer{flex:0 0 auto}
.sgi-crud-table>.table-responsive{flex:1 1 0;min-height:0;overflow:auto}
.sgi-crud-table thead th{position:sticky;top:0;z-index:1;background:var(--bs-body-bg)}
.sgi-crud-options{white-space:nowrap}
.sgi-crud-menu{position:fixed!important;z-index:1090;min-width:160px;box-shadow:0 .5rem 1.5rem #00000020}
.sgi-crud-menu[hidden]{display:none!important}
@media(max-width:575.98px){.sgi-crud-toolbar .card-body{padding:.75rem}.sgi-crud-toolbar>.d-flex{margin-bottom:.65rem!important}.sgi-crud-toolbar .form-label{margin-bottom:.25rem}}
.sgi-crud-toolbar #advanced-search-panel.show{max-height:45dvh;overflow-y:auto;overscroll-behavior:contain;padding:1px}
.sgi-crud-table>.card-body.table-responsive{padding:0}
.sgi-crud-toolbar #question-search.show,.sgi-crud-toolbar #settings-advanced.show{max-height:clamp(120px,calc(100dvh - 540px),330px);overflow-y:auto;overscroll-behavior:contain}

/* Controles compartilhados de listagem, conforme DIVCONTROL. */
.sgi-list-search{width:414px;max-width:100%;margin-bottom:1rem}
.card-header .sgi-list-search{margin-bottom:0}
.sgi-list-search .input-group-text{background:var(--bs-body-bg);color:var(--bs-secondary-color)}
.sgi-list-search .form-control{background:var(--bs-body-bg);min-height:34px}
.sgi-list-busy[hidden]{display:none}
.sgi-list-footer{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.75rem;font-size:.8rem;color:var(--bs-secondary-color)}
.sgi-list-footer .form-select{min-width:65px}
@media(max-width:575.98px){.sgi-list-search{width:100%}.sgi-list-footer>div:last-child{width:100%;justify-content:space-between!important}.sgi-list-footer .pagination{flex-wrap:wrap}}
/* Regra global: retorno à esquerda, demais ações à direita. */
.sgi-action-bar{display:flex!important;flex-direction:row!important;flex-wrap:wrap;align-items:center;gap:.5rem;width:100%;text-align:left!important}
.sgi-action-bar>.sgi-back-button{order:-1;margin-inline-start:0!important;margin-inline-end:auto!important}
.certification-view[hidden]{display:none!important}

/* O shell rola somente no conteúdo; evita concorrência com a regra responsiva do AdminLTE. */
body.sgi-shell.layout-fixed .app-wrapper>.app-main{overflow:hidden;min-height:0}

/* Keep row action labels and chevrons on one compact line. */
button[data-crud-actions]{display:inline-flex;align-items:center;justify-content:center;gap:.35rem;white-space:nowrap;flex-shrink:0;width:max-content}button[data-crud-actions]>.bi{flex-shrink:0}

/* Neutral white actions buttons, shared by all list menus. */
button[data-crud-actions]{--bs-btn-color:var(--bs-body-color);--bs-btn-bg:var(--bs-body-bg);--bs-btn-border-color:var(--bs-secondary-color);--bs-btn-hover-color:var(--bs-body-color);--bs-btn-hover-bg:var(--bs-tertiary-bg);--bs-btn-hover-border-color:var(--bs-secondary-color);--bs-btn-active-color:var(--bs-body-color);--bs-btn-active-bg:var(--bs-secondary-bg);--bs-btn-active-border-color:var(--bs-secondary-color)}

/* Login compacto e recuperação de acesso. */
.sgi-login .login-area{align-items:flex-start;padding-top:clamp(1rem,4vh,2.5rem);overflow-y:auto}
.sgi-login .login-showcase{align-items:flex-start;padding-top:clamp(2rem,8vh,5rem)}
.sgi-login .recovery-shell{display:block}.recovery-shell .login-area{min-height:100%;justify-content:center}.recovery-shell .login-panel{width:100%;max-width:520px}
