/* Botão padrão para log, aprovar-usuarios e aprovar-emails */
.btn-log-alteracoes {
    background: #e0e0e0;
    color: #222;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.05rem;
    padding: 8px 20px;
    box-shadow: 0 2px 8px rgba(100,100,100,0.08);
    transition: background 0.2s, box-shadow 0.2s;
    text-decoration: none;
    margin-bottom: 18px;
    display: inline-block;
    margin-right: 10px;
}
.btn-log-alteracoes:hover {
    background: #cccccc;
    color: #b3001b;
    box-shadow: 0 4px 16px rgba(100,100,100,0.13);
}
/* Garantir visibilidade do dropdown de usuário na central de liderança */
.dropdown.user-menu {
    position: relative;
    z-index: 1002 !important;
}
.dropdown.user-menu .dropdown-menu {
    z-index: 1003 !important;
    position: absolute;
    right: 0;
    top: 100%;
    min-width: 180px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.13);
    padding: 10px 0;
    display: none;
}
.dropdown.user-menu.open .dropdown-menu {
    display: block;
}
.portal-home.no-hero .content-wrapper .index-title,
.portal-home.no-hero .content-wrapper .intro-text {
    text-align: center !important;
    margin-left: auto;
    margin-right: auto;
    display: block;
}
/* Marcadores de lista transparentes apenas no FAQ RH */
.faq-list li::marker {
    color: transparent;
}
.login-button[href*="faqrh"]:hover {
    background: #fff !important;
    color: #c00 !important;
    border: 1.5px solid #c00 !important;
    transition: background 0.2s, color 0.2s;
}

.login-feedback {
    margin: 12px 0 16px;
    padding: 10px 14px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    text-align: center;
}

.login-feedback.sucesso {
    background: #e9f8ef;
    color: #146534;
    border: 1px solid rgba(20, 101, 52, 0.2);
}

.login-feedback.erro {
    background: #fdecee;
    color: #861721;
    border: 1px solid rgba(134, 23, 33, 0.2);
}

.portal-home .faq-back-button {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.7);
    padding: 6px 12px;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    min-height: 36px;
    margin-bottom: 0px;
}

.portal-home .faq-back-icon {
    font-size: 18px;
    line-height: 1;
}

.portal-home .faq-back-text {
    font-size: 0.95rem;
    font-weight: 600;
}

@media (min-width: 901px) {
    .portal-home .site-header.has-faq-back .header-row {
        justify-content: space-between;
        gap: 12px;
    }

    .portal-home .site-header.has-faq-back .header-actions {
        margin-left: auto;
    }
}


.faq-rh-bg {
    background-image: url('../images/papel-parede.jpg');
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
}
/* Configurações gerais das páginas */
:root{
    --vermelho: rgb(225, 25, 35);
    --madesa-red: #e11923;
    --madesa-red-dark: #7c141a;
    --madesa-neutral: #f6f2f2;
    --madesa-gray: #222;
    --space-2xs: clamp(6px, 1vw, 10px);
    --space-xs: clamp(10px, 1.6vw, 14px);
    --space-sm: clamp(12px, 2vw, 18px);
    --space-md: clamp(16px, 3vw, 26px);
    --space-lg: clamp(24px, 4vw, 40px);
    --space-xl: clamp(32px, 6vw, 60px);
    --container-pad: clamp(16px, 6vw, 80px);
    --content-pad-bottom: clamp(120px, 14vw, 220px);
    --header-pad-y: clamp(12px, 2vw, 20px);
    --header-pad-x: clamp(16px, 5vw, 42px);
    --hero-pad-y: clamp(40px, 9vw, 140px);
    --hero-pad-x: clamp(18px, 6vw, 72px);
    --card-radius: clamp(12px, 2.5vw, 20px);
    --card-gap: clamp(14px, 3vw, 24px);
}

.hero-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 480px);
    align-items: center;
    gap: clamp(24px, 4.5vw, 48px);
    padding: 20px var(--hero-pad-x) 96px;
}

.hero-section .hero-copy {
    display: flex;
    flex-direction: column;
    gap: clamp(16px, 2vw, 20px);
}

.hero-section .hero-kicker {
    font-size: 0.85rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    opacity: 0.82;
}

.hero-section h1 {
    text-align: left;
    padding-bottom: 0;
    line-height: 1.1;
    font-size: clamp(2.2rem, 4vw, 3.4rem);
}

.hero-section p {
    text-align: justify;
    line-height: 1.6;
}

.hero-section .hero-media {
    display: flex;
    justify-content: center;
}

.hero-section .hero-media img {
    width: min(100%, 530px);
    height: auto;
    border-radius: 28px;
    box-shadow: 0 28px 60px rgba(8, 15, 30, 0.35);
}

.hero-section .hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero-section .hero-action,
.hero-section .hero-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 999px;
    font-weight: 600;
}
*{
    margin:0;
    padding:0;
}
html, body{
    min-height: 100vh;
    height: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}
main {
    flex: 1;
}
body {
    background-image: url('../images/fundo.png');
    background-color: #ffffff;
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
    background-position: center center;
    font-family: 'Roboto', sans-serif;
    font-size:16px;
    overflow-x: hidden;
    min-height: 100vh;
}

.page-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    flex: 1 0 auto;
}

.page-wrapper > main {
    flex: 1 0 auto;
}

footer,
.footer1 {
    flex-shrink: 0;
    margin-top: auto;
}

footer:not(.footer1) {
    width: 100%;
    text-align: center;
    padding: 14px 18px;
    color: #5f6368;
    background: #fff;
    border-top: 1px solid #e6e8eb;
    box-sizing: border-box;
}
/* Papel de fundo exclusivo para index.php */
body.fundo-index {
    background-image: url('../images/papel-parede.jpg');
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
}
body .gallery-container {
    box-sizing: border-box;
}
body > .menu-center, .card-login, #aviso {
    flex: 1;
}

.fundo, .fundo2{ /* Fundo das homes */
    background-image: url(../images/fundo.png);
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
}
.fundo{
    display: flex;
    justify-content: center;
}
/* plano de fundo para telas de autenticação (guest layout) */
body.fundo {
    background-image: url('../images/plano de fundo.png');
}

/* Configurações de fonte */
@font-face {
    font-family: custom;
    src: url(Museo700-Regular.otf)
}

/* Configurações da letra */
h1{
    text-align: center;
    padding-bottom:20px;
}
h3{
    font-size: clamp(15px, 2.5vw, 22px);
    text-decoration: none;
    font-weight: normal;
    margin-bottom:10px;
}
h1#aviso{
    text-align:center;
    margin: 50px 0 50px 0;
    font-size: clamp(22px, 3vw, 30px);
}
h2#aviso{
    text-align: center;
    margin: 0 20px 65px 20px;
    font-size: 22px;
}
ul{
    padding-left:25px;
}
a{
    text-decoration:none;
}
p{
    text-align: center;
}
#codigo-ver{
    font-size: clamp(11px, 1.6vw, 17px);
}
a#login{
    text-align:right;   
    color:blue;
    text-decoration: underline;   
}
#pdf-acesso:hover{
    color:rgb(51, 51, 255);
}

.login-input, .form-input, .form-input2, .relatorio-input{
    border-left: none;
    border-right: none;
    border-top: none;
    outline:none;
}
.login-input, .form-input, .relatorio-input{
    width: 100%;
    padding: 10px 10px 5px 3px;
    font-size: clamp(13px, 1.6vw, 17px);
    margin-bottom: 25px;
}
.relatorio-input{
    background-color: transparent;
}
.form-input2{
    width: 80%; 
    margin: 0 0 8px 8px;
    padding-bottom: 7px;
    margin-bottom: 15px;
    font-size: clamp(14px, 2.2vw, 17px);
}
#file-input-wrapper {
    align-items: center;
}

#file-input {
    width: 100%;
    margin-right: 10px;
}
.radio-input{
    width: 30px;
    margin-top: 10px;
    margin-bottom: 10px;
}

legend{
    font-size: 18px;
    margin-left: 10px;
}
.obrigatorio{
    color: var(--vermelho);
    padding: 5px;
}
#obrigatorio-frase {
    color: var(--vermelho);
    margin-left: auto;
    margin-bottom: 20px;
    font-size: 12px;
}
#n_paginas{
    margin-bottom: 30px;
}
#sobre{
    text-align: left;
    list-style-position: inside;
    background-color: rgb(255, 255, 255);
    border-radius: 10px;
    padding: 20px;
    margin-top: 75px;
    max-width: 80%;
}
#container-sobre{
    display: flex;
    justify-content: center;
}
#sobre li{
    margin-bottom: 10px;
    font-size: clamp(12px, 2.4vw, 20px);
    list-style-type: square;
}
.titulo-login{
    text-align:center;
    font-size: clamp(19px, 2.7vw, 30px);    
    margin-bottom: 20px;
}
.titulo-form{
    margin: 20px 0px;
    font-size: clamp(20px, 3.5vw, 32px);
}
.texto-login{
    font-size: clamp(16px, 2.7vw, 28px);
}
#input-senha{
    padding-bottom: 5px;
}
#aviso-caps{
    color: red; 
    visibility: hidden; 
    font-size: 13px; 
    display: block;
    padding-bottom: 10px;
}

.sinopse-info{
    font-style: italic;
    margin-top: 30px;
}
.text-info{
    font-size: clamp(20px, 2.5vw, 28px);
}
.titulo{
    font-size: clamp(24px, 3vw, 45px);   
}
.titulo{
    margin: 50px 0;
}
#titulo2{
    margin-top: 20px;
    font-size: clamp(26px, 3vw, 32px);
}
#titulo-relatorio{
    font-size: clamp(20px, 3vw, 35px);   
}
#subtitulo-relatorio{
    font-size: clamp(14px, 2vw, 20px);
}

.bem-vindo{
    text-align:center;
    font-weight: bold;
    font-size: clamp(20px, 3.5vw, 35px);
    margin: 50px 0;
}
.subtitulo{
    padding: 15px;
    color:rgb(88, 88, 88);
    font-size: 30px;
}
p#padrao{
    padding-top: 15px;
}

/* Configurações da galeria de imagens */
#gallery-container{
    display: flex;
    flex-wrap:wrap;
    justify-content:space-evenly;
    gap: 2vw;
    padding: 0 1vw;
    padding-bottom: 50px;
    box-sizing: border-box;
}

.gallery-items{
    width: clamp(150px, 30vw, 260px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 5px 5px 5px black;
    border: 10px solid white;
    margin-top:30px;
}
.gallery-items p{
    padding-top:10px;   
    text-align:center;
    color: var(--vermelho);
    font-weight: bold;
    display: block;
    width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    background-color: white;
}
.gallery-items img{
    width:100%;
    height:100%;
}
.livro-form {
    width: 255px;
    height: 350px;
    box-shadow: 10px 10px 10px black;
}
.logo-madesa-login{
    width: 180px;
    height: 150px;
    margin-bottom: 20px;
}

/* Configurações do botão de envio de arquivo */
.menu-center{
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
}
.menu-home{
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    padding: 20px 0;
}
#menu-inline{
    display: inline-block;
}

#importar{
    text-align: center;
}
.material-symbols-outlined {
    font-size: 24px; 
}
.add, .close{
    margin: 0 5px 1px 0;
}
/* Configurações dos cards */
.card-config {
    max-width: 480px;
    margin: 40px auto;
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
    background: #fff;
    border-radius: 18px;
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.card-config h2,
.card-config .descricao-info,
.card-config .section-form {
    text-align: center;
    width: 100%;
}

.card-login {
    display: flex;
    justify-content: center;
    align-items: center;
}

.site-header .header-quick-link {
    margin-left: 12px;
    padding: 8px 14px;
    border-radius: 999px;
    background: #fff;
    color: var(--madesa-red);
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(225, 25, 35, 0.1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.site-header .header-quick-link:hover,
.site-header .header-quick-link:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.16);
    border-color: rgba(225, 25, 35, 0.2);
    outline: none;
}
label, #link, p{
    font-size: clamp(12px, 2.3vw, 16px);
}

/* Configurações das div */
.section-form, .formulario-form, .info-form{
    display:flex;
    flex-direction:column;
    align-items:center;
    background-color:rgb(255, 255, 255);
    border: 1px solid black;
    border-radius:15px;
}
.section-form{
    padding: 30px;
    margin: 0 20px;
}
.section-form form, .formulario-form form {
    width: 100%;
}
.section-form.active {
  display: block;
}
.form {
    background-color: gray;
}


.formulario-form{
    padding: 20px;
}
.info-form{
    margin: 0 20px;
    padding: 30px;
}

.info-form h3{
    text-align: center;
}
#relatorio-form{
    display: flex; 
    gap: 3rem; 
    flex-wrap: wrap; 
    align-items: flex-end;
    justify-content:center;
}
#relatorio-form label{
    font-size: 14px;
}

#feed{
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}
#pagination {
    display: flex;
    justify-content: flex-end;
    list-style-type: none;
    padding: 0;
}
#pagination a, #pagination span {
    margin: 0 5px;
    padding: 10px 15px;
    text-decoration: none;
    background-color: rgb(225, 25, 35);
    color: white;
    border-radius: 5px;
}
#pagination #current-page {
    background-color: rgb(172, 0, 0);
    font-weight: bold;
}

#noticia-corpo{
    max-width: 900px;
    margin: 50px auto;
    width: 90%;
}

.formatacao-imagem{
    display: flex;
    justify-content: space-between;
    align-items:center;
    background-color:white;
    padding: 30px;
    border: 1px solid black;
    border-radius:15px;
    max-width: 70%;
}
#imagem-atual {
    margin-left: 10px;
    font-style: italic;
}
#custom-file-upload {
    display: inline-block;
    padding: 6px 12px;
    cursor: pointer;
    background-color: #f1f1f1;
    max-width: 320px;
    border-radius: 4px;
}
#imagem-display {
    display: none;
    word-break: break-word;
    overflow-wrap: break-word;
    overflow: hidden;
    align-self: center;
}

.divider{
    margin: 40px 0;
    height: 1px;
    overflow: hidden;
    background-color: #e0e0e0;
}

.opcoes{
    text-align: center;
    margin-bottom: 50px;
}
.opcoes-form{
    text-align: center;
    margin-top: 75px;
}

/* Informações e títulos */
.info-container{
    margin: 20px;
}
.info-container#descricao{
    text-align: center;
    margin-right: 10px;
}
.card-descricao {
    margin: 0 20px;
}

.titulo-livro, .titulo-lista {
    text-align: center;
    padding-bottom: 20px;
    font-weight: bold;
}

.titulo-livro {
    font-size: clamp(18px, 3vw, 35px);
}

.titulo-lista {
    font-size: 35px;
    margin-right: 20px;
}

#login, #atualizar-senha{
    width: clamp(225px, 35vw, 350px);
}
#cadastro{
    margin: 40px 0;
    width: clamp(225px, 35vw, 450px);
}

#descricao{
    max-width: 70%;
}
#adicionar-emprestimo{
    max-width: 80%;
    width: clamp(225px, 35vw, 350px);
    margin-top:70px;
    margin-bottom:60px;
}
.descricao{
    margin-bottom: 20px
}
#esqueceu{
    width: clamp(225px, 40vw, 400px);
}
#editar-livro, #editar-usuario{
    width: clamp(230px, 50vw, 450px);
    margin-top:50px;
}
#editar-categoria, #editar-setor{
    width: clamp(220px, 50vw, 400px);
    margin-top:80px;
}

#devolver-livro{
    margin-top:70px;
    margin-bottom:40px;
}
#config, #alterar-senha{
    width: 50%;
    max-width: 350px;
    margin-top:80px;
    margin-bottom:50px;
}

#adicionar-livro, #adicionar-usuario{
    width: clamp(210px, 40vw, 450px);
    margin-top: 50px;
}
#adicionar-noticia, #editar-noticia{
    width: 70%;
    max-width: 1200px;
    margin-top: 50px;
}
#home, .home2{
    background-color: white;
    padding: 25px 20px;
    border-radius: 10px;
    margin: 50px auto 0 auto;
    border: 1px solid black;
    text-align: center;
    box-sizing: border-box;
}
#home{
    max-width: 550px;
    min-width: 170px;
    width: 100%;
}
.home2{
    max-width: 800px;
    min-width: 330px;
    width: 70%;
}
input#arquivo {
    margin-bottom: 30px;
}
/* Configurações da página de postagens da Biblio News*/
#post {
    display: flex;
    margin-bottom: 50px;
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    min-height: 100px;
}
#post-img {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 30%;
    max-width: 30%;
    overflow: hidden;
}

#post-img img {
    height: auto;
    display: block;
}
#post-content{
    flex: 1;
    padding: 13px;
    line-height: 30px;
}

#noticia-titulo{
    font-size: 40px;
    margin: 20px 0;
    padding: 0;
}
#noticia-date{
    font-size: 20px;
    color: #888;
    margin-bottom: 40px;
}
#thumb-noticia{
    text-align: center;
    max-width: 50%;
    overflow: hidden;
    margin: 30px auto;
}
#thumb-noticia img {
    display: block;
    width: 100%; 
    height: auto; 
}
#noticia-subtitulo{
    font-size: clamp(20px, 3vw, 30px);
    margin-bottom: 30px;
    color: #888;
}
#noticia-content p{
    font-size: 20px;
    line-height: 25px;
    text-align: left;
}
#noticia-content p:not(:last-child) {
    margin-bottom: 20px;
}
.secao {
    position: relative;
    padding: 15px;
    border: 1px solid #ccc;
    margin: 30px 0;
}
#secao-post {
    margin-bottom: 60px;
}
#secao-post.sem-subtitulo {
    margin-top: 150px; 
}
#post-title {
    font-size: 20px;
    margin-bottom: 10px;
}
#post-title a{
    color: var(--vermelho);
}
#post-date {
    font-size: 14px;
    color: #888;
    padding-bottom: 10px;
    text-align: left;
}

/* Configurações dos select/radio */
.select-setor select, .select-categoria select, .select-tabela select{
    font-size: clamp(11px, 2vw, 16px);
    height: 35px;
    border-radius: 10px;
    border: 1px solid black;
    outline: none;
    margin: 5px;
    width: 40%;
}
.select-tabela select {
    width: 300px;
    margin: 0 10px; 
}
.select-tabela {
    text-align: left; 
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 0 10px;
}
.select-categoria select, .select-setor select{
    margin: 10px 0;
}

.idioma-field {
    margin: 20px 0;
}
.select-lugar{
    margin-bottom: 20px;
}
.email-checkbox{
    margin: 20px 0;
}

textarea{
    font-family: 'Roboto', sans-serif;
    resize: none;
    padding: 10px;
    line-height: 1.5em;
    margin: 10px 0 20px 0;
}
.sinopse{
    width: 95%;
    height: 200px;
}
.text-titulo, .text-subtitulo, .text-descricao{
    padding: 8px;
    border: 2px solid #ccc;
    border-radius: 5px;
    width: 95%;
}
.text-titulo, .text-subtitulo {
    font-size: 20px;
}
.text-titulo:focus, .text-subtitulo:focus, .text-descricao:focus{
    outline: none !important;
    border: 2px solid #006CE7;
}
.text-titulo{
    height: 30px;
    font-weight: bold;
}
.text-subtitulo{
    height: 60px;
    color: rgb(88, 88, 88);
}

.text-descricao{
    height: 200px;
    border: 2px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
}
#form-titulo-noticia{
    margin: 10px;
}

.radio-wrapper{
    display: inline-block;
    margin-right:10px;
}

/* Configurações dos form */
#login form{
    display: flex;
    flex-direction: column;
    width:100%;
}
.filtro-checkbox {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}
.filtro-checkbox label {
    margin-left: 5px;
    margin-right: 20px;
}

/* Configurações das sinopses */
.sinopse-descricao, .paragrafo1{
    text-align:justify;
    text-indent:40px;
    margin-right:30px;
    font-size: clamp(12px, 2.6vw, 18px);
    line-height: 1.5;
}
.sinopse-descricao{
    margin-top:10px;
}
.paragrafo1 {
    margin-top: 30px;
}

/* Configurações dos links */
#link{
    color: var(--vermelho);
    text-decoration: underline;
    line-height:35px;
    font-weight: bolder;
    display: block; 
    float: right;
}

#link:hover {
    color:rgb(150, 14, 14);
}

/* Configurações dos ícones pequenos */
.edit-btn, .detail-btn{
    color: blue;
}
.desativar-btn, .reprovar-btn{
    color: var(--vermelho);
}
.ativar-btn, #aprovar-btn {
    color: rgb(0, 187, 16);
}
#delete-btn{
    color: var(--vermelho);
}
.detail-btn{
    cursor: pointer;
}

th, td {
    padding: 6px 10px;
    font-size: 12px;
    border: none;
    text-align: center;
}
th:first-child{
    border-top-left-radius: 10px;
}
th:last-child{
    border-top-right-radius: 10px;
}

th{
    background-color: var(--vermelho);
    color: white;
}
th.fv{
    background-color: white;
    color: var(--vermelho);
}

#pesquisar{
    width: 380px;
    padding: 15px;
    font-size:15px;
    border:none;
    border-radius: 10px;
}

#botoes-coluna{
    display: flex;
    height: 30px;  
}

.help-icon {
    font-size: 18px;
    vertical-align: middle;
    margin-left: 4px;
    transform: translateY(-1px);
    cursor: default;
}

.help-icon::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    display: block;

    background-color: #ffffff;
    color: #000000;
    padding: 6px 8px;
    border-radius: 4px;

    font-size: 12px;
    font-family: 'Segoe UI', sans-serif;
    text-align: center;
    line-height: 1.4;

    max-width: 220px;
    width: max-content;
    min-width: 100px;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: break-word;

    box-sizing: border-box;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease-in-out;
}

.help-icon:hover::after,
.help-icon:hover::before {
  opacity: 1;
}

/* Define a cor de fundo das células */
td.cel-vermelho{
    background-color: var(--vermelho);
    color: white;
}
td.cel-verde{
    background-color: green;
    color: white;
}
td.cel-amarelo{
    background-color: yellow;
    color: black;
}
.red{
    color:var(--vermelho);
}
.green{
    color: green;
}

/* FORMATAÇÃO DO DRAG AND DROP*/
.drop-area{
    display: flex;
    justify-content: center; 
    align-items: center;
    margin: 20px 0 10px 0;
}

.img-view {
    width: 150px;
    height: 205px;
    border-radius: 20px;
    border: 2px dashed #bbb5ff;
    background: #f7f8ff;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    background-image: none !important;
    padding: 5px;
}

.img-view img {
    width: 50px;
    display: block;
}
.img-view span {
    font-size: 12px;
    color: #777;
    margin-top: 15px;
    text-align: center;
}

.img-view.uploaded img,
.img-view.uploaded p,
.img-view.uploaded span {
    display: none; 
}

.readonly{
    color: rgba(0, 0, 0, 0.42)
}

@media(max-width: 1000px) {
    .livro-form {
        width: 180px;
        height: 250px;
    }
    .sinopse-descricao{
        margin-left: 20px;
        margin-right: 10px;
    }
    #titulo, #catalogo {
        font-size: 36px;
    }
}

@media(max-width: 750px) {
    #adicionar-categoria, #adicionar-setor, #adicionar-categoria{
        width: 350px;
    }
    .idioma-field{
        flex-direction: column; 
        align-items: center; 
        text-align: center; 
        padding: 10px; 
    }
    .livro-form {
        width: 140px;
        height: 190px;
    }
    .formatacao-imagem{
        flex-direction:column;
        padding: 20px;
    }
    .sinopse-descricao, .info-container#descricao{
        margin: 0;
    }
    #noticia-titulo{
        font-size: 34px;
    }
    #noticia-content p{
        font-size: 16px;
    }
    .text-titulo, .text-subtitulo {
        font-size: 17px;
    }
    .text-descricao{
        font-size: 14px;
    }
    ul{
        padding-left:15px;
    }
    .home{
        width: 70%;
    }
    .card-descricao{ 
        flex-direction: column;
    }
    #menu-inline{
        display: flex;
        flex-direction: column;
    }
}

@media(max-width: 550px) {
    .sinopse-info{
        font-size: 16px;
    }
    .img-view {
        width: 120px !important;
        height: 160px !important;
    }
    .post {
        flex-direction: column;
    }
    #post-img {
        max-width: 100%;
    }
    #noticia-titulo{
        font-size: 26px;
    }
    #catalogo{
        font-size: 20px;
    }
    .text-descricao{
        font-size: 12px;
    }
    #pesquisar{
        width: 240px;
    }
}

/* Portal home styles */
.portal-home {
    margin: 0;
    background: radial-gradient(circle at top left, rgba(225, 25, 35, 0.12), transparent 55%),
                radial-gradient(circle at bottom right, rgba(124, 20, 26, 0.12), transparent 45%),
                #fefbfb;
    color: var(--madesa-gray);
    font-family: 'Roboto', Arial, sans-serif;
}

.portal-home.fundo-index .page-wrapper {
    background: transparent !important;
    box-shadow: none !important;
}

.portal-home .content-wrapper {
    position: relative;
    margin-top: clamp(-140px, -10vw, -80px);
    padding: var(--hero-pad-y) clamp(18px, 6vw, 80px) var(--content-pad-bottom);
    background: transparent;
    overflow: visible;
}

.portal-home .content-wrapper::before {
    content: "";
    position: absolute;
    top: -120px;
    left: 0;
    right: 0;
    height: 0px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #fefbfb 88%);
    pointer-events: none;
    z-index: -1;
}

.portal-home.no-hero.fundo-index .content-wrapper {
    background: transparent !important;
    box-shadow: none !important;
}

.portal-home.no-hero .content-wrapper::before {
    display: none;
}

.portal-home.no-hero .content-wrapper > section {
    max-width: 1400px;
    margin: 0 auto;
    text-align: center !important;
}

.portal-home.no-hero .content-wrapper {
    margin-top: clamp(-146px, 1vw, -84px);
}

.portal-home.no-hero .content-wrapper h1 {
    font-size: clamp(32px, 4vw, 44px);
    margin-bottom: 12px;
}

.portal-home.no-hero .intro-text {
    font-size: clamp(16px, 2vw, 18px);
    color: #4a4a4a;
    margin-bottom: 40px;
}

.portal-home.no-hero .app-grid {
    margin-top: 24px;
}

.portal-home .site-header {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    background: linear-gradient(90deg, #e11923, #b3001b);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 100;
    color: #fff;
    overflow: visible;
    transition: transform 0.3s ease;
}

.portal-home .site-header.header--hidden {
    transform: translateY(-100%);
}

.portal-home .site-header .header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--header-pad-y) var(--header-pad-x);
    gap: clamp(10px, 2vw, 18px);
}

/* ── Sidebar Nav ──────────────────────────────────────── */

/* Hambúrguer — sempre visível no header */
.portal-home .sidebar-burger {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 8px;
    transition: background 0.15s;
}
.portal-home .sidebar-burger:hover {
    background: rgba(255, 255, 255, 0.15);
}
.portal-home .sidebar-burger svg {
    display: block;
}

/* Overlay escuro */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 498;
}
.sidebar-overlay.is-open {
    display: block;
}

/* Painel lateral */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    height: 100dvh;
    width: 280px;
    max-width: 85vw;
    background: #1e293b;
    z-index: 500;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}
.sidebar.is-open {
    transform: translateX(0);
}

/* Cabeçalho do sidebar */
.sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}
.sidebar-close {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.65);
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    line-height: 1;
    transition: color 0.15s, background 0.15s;
}
.sidebar-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

/* Links do sidebar */
.sidebar-nav-list {
    list-style: none;
    margin: 0;
    padding: 10px 0;
    flex: 1;
}
.sidebar-nav-list > li > a,
.sidebar-nav-list > li > button.sdrop-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.80);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    background: none;
    border: none;
    border-left: 3px solid transparent;
    cursor: pointer;
    text-align: left;
    box-sizing: border-box;
    transition: background 0.15s, color 0.15s;
}
.sidebar-nav-list > li > a:hover,
.sidebar-nav-list > li > button.sdrop-trigger:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
}
.sidebar-nav-list > li.snav-active > a {
    border-left-color: rgba(255, 255, 255, 0.85);
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

/* FAQ — sub-menu colapsável */
.sdrop-caret {
    font-size: 0.7em;
    opacity: 0.6;
    transition: transform 0.2s;
    flex-shrink: 0;
}
.sidebar-nav-list > li.sdrop-open > button.sdrop-trigger .sdrop-caret {
    transform: rotate(180deg);
}
.sdrop-body {
    display: none;
    padding: 0 0 6px 0;
}
.sdrop-body.is-open {
    display: block;
}
.sdrop-group-title {
    padding: 8px 20px 4px 28px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.38);
}
.sdrop-body ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.sdrop-body ul li a {
    display: block;
    padding: 9px 20px 9px 28px;
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.15s, color 0.15s;
}
.sdrop-body ul li a:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
}

.portal-home .header-actions {
    display: flex;
    align-items: center;
    gap: clamp(10px, 2vw, 18px);
}

.portal-home .leadership-chip {
    display: inline-flex;
    align-items: center;
    gap: clamp(8px, 1.6vw, 14px);
    padding: clamp(8px, 1.8vw, 14px) clamp(14px, 3vw, 22px);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.25);
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.portal-home .leadership-chip:hover,
.portal-home .leadership-chip:focus-visible {
    background: rgba(255, 255, 255, 0.28);
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
    outline: none;
}

.portal-home .leadership-chip .chip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: rgba(255, 255, 255);
    font-size: 20px;
}

.portal-home .leadership-chip .chip-text {
    display: inline-flex;
    flex-direction: column;
    line-height: 1.2;
}

.portal-home .leadership-chip .chip-sub-highlight {
    font-size: 0.7em;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.8;
    font-weight: 600;
}

@media (min-width: 641px) {
    .portal-home .leadership-chip {
        display: inline-flex;
        align-items: center;
        gap: clamp(8px, 1.6vw, 14px);
        padding: clamp(8px, 1.8vw, 14px) clamp(14px, 3vw, 22px);
        border-radius: 999px;
        width: auto;
        height: auto;
        font-size: 1rem;
    }

    .portal-home .leadership-chip .chip-text {
        display: inline-flex;
        flex-direction: column;
        line-height: 1.2;
    }

    .portal-home .leadership-chip .chip-icon {
        width: 30px;
        height: 30px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 1);
        font-size: 20px;
    }
}

@media (max-width: 640px) {
    .portal-home .site-header .header-row {
        flex-wrap: wrap;
        gap: 8px;
        align-items: center;
    }

    .portal-home .site-header .brand-area {
        order: 1;
        flex: 0 0 auto;
        margin-right: 0;
    }

    .portal-home .site-header .main-nav {
        order: 4;
        flex: 0 0 100%;
        width: 100%;
        display: flex;
        justify-content: center;
        gap: 8px;
        padding-top: 8px;
        padding-bottom: 0;
        flex-wrap: wrap;
    }

    .portal-home .header-actions {
        order: 3;
        width: auto;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .portal-home .leadership-chip {
        padding: 6px;
        font-size: 0;
        /* width: clamp(42px, 11vw, 56px);*/
        /* height: clamp(42px, 11vw, 56px);*/
        border-radius: 50%;
        justify-content: center;
    }

    .portal-home .leadership-chip .chip-text {
        display: none;
    }

    .portal-home .leadership-chip .chip-icon {
        background: transparent;
        font-size: clamp(18px, 5vw, 22px);
    }

    .portal-home .site-header .dropdown.user-menu {
        order: 2;
        flex: 0 0 auto;
        margin-left: 4px;
    }

    .portal-home .site-header .brand-area img {
        height: clamp(56px, 9vw, 70px);
        width: auto;
    }

    .portal-home .user-menu .user-badge {
        width: clamp(42px, 11vw, 56px);
        height: clamp(42px, 11vw, 56px);
        padding: 0;
        justify-content: center;
        gap: 0;
        border-radius: 50%;
    }

    .portal-home .user-badge__name,
    .portal-home .user-badge__caret {
        display: none;
    }

    .portal-home .site-header .main-nav .nav-link {
        flex: 1 1 calc(50% - 8px);
        min-width: calc(50% - 8px);
    }

    .faq-app .site-header .main-nav .nav-link {
        flex: 1 1 calc(50% - 8px);
        min-width: calc(50% - 8px);
    }

    .faq-app .site-header .main-nav .nav-link:nth-child(3) {
        flex: 1 1 100%;
        min-width: 100%;
    }

    .portal-home .nav-link {
        min-width: 0;
        flex: 1 1 auto;
        white-space: normal;
        padding: 6px 8px;
        font-size: 0.85rem;
        text-transform: none;
        text-align: center;
        line-height: 1.25;
    }

    .portal-home .site-header .header-quick-link {
        display: none;
    }
}

.portal-home .brand-area {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.portal-home .brand-icon-placeholder {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0.08));
    border: 1px solid rgba(255, 255, 255, 0.35);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.8);
}


.portal-home .main-nav {
    display: flex;
    align-items: center;
    gap: clamp(8px, 2vw, 18px);
}

.portal-home .nav-link {
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    padding: clamp(8px, 1.4vw, 12px) clamp(10px, 2vw, 16px);
    border-radius: clamp(8px, 2vw, 12px);
    transition: background 0.2s ease;
    background-color: var(--madesa-red-dark);
    min-width: clamp(120px, 20vw, 180px);
    text-align: center;
}

.portal-home .nav-link:hover {
    background: rgba(255, 255, 255, 0.18);
}

.portal-home .dropdown {
    position: relative;
}

.portal-home .dropdown-trigger {
    background: rgba(255, 255, 255, 0.14);
    border: none;
    padding: 8px 16px;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.portal-home .dropdown-trigger:hover,
.portal-home .dropdown-trigger[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.24);
}

.portal-home .dropdown-trigger:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.9);
    outline-offset: 2px;
}

.portal-home .dropdown-menu {
    position: absolute;
    top: 110%;
    right: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.12);
    padding: 12px 0;
    width: 240px;
    display: none;
}

.portal-home .dropdown-menu a,
.portal-home .dropdown-menu button {
    display: block;
    width: 100%;
    padding: 10px 20px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    background: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
}

.portal-home .dropdown-menu a:hover,
.portal-home .dropdown-menu a:focus-visible,
.portal-home .dropdown-menu button:hover,
.portal-home .dropdown-menu button:focus,
.portal-home .dropdown-menu button:focus-visible {
    background: rgba(225, 25, 35, 0.12);
    color: var(--madesa-red);
}

.portal-home .dropdown.open .dropdown-menu {
    display: block;
}

.portal-alert {
    margin: 18px auto 0;
    padding: 16px 20px;
    border-radius: 14px;
    width: min(720px, 92vw);
    display: grid;
    gap: 6px;
    font-weight: 500;
}

.portal-alert--erro {
    background: rgba(225, 25, 35, 0.12);
    color: #7c141a;
    border: 1px solid rgba(225, 25, 35, 0.2);
}

.portal-alert--erro strong {
    font-size: 1rem;
}

.portal-home .user-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.16);
    padding: 6px 16px;
    border-radius: 999px;
    font-weight: 600;
    color: #fff;
    border: none;
    appearance: none;
    box-shadow: none;
    text-decoration: none;
}

.portal-home .hero-next-app {
    position: absolute;
    top: clamp(16px, 4vw, 42px);
    bottom: clamp(16px, 4vw, 42px);
    right: clamp(12px, 3.8vw, 44px);
    width: clamp(38px, 4.5vw, 52px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.76));
    border-radius: 999px;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
    color: var(--madesa-red);
}
.portal-home .hero-next-app:hover,
.portal-home .hero-next-app:focus-visible {
    border-color: rgba(225, 25, 35, 0.35);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.82));
    transform: translateX(6px);
    box-shadow: 0 24px 52px rgba(0, 0, 0, 0.25), 0 0 0 3px rgba(225, 25, 35, 0.18);
    outline: none;
}
.portal-home .hero-next-app__icon {
    font-size: clamp(24px, 4vw, 32px);
    writing-mode: vertical-rl;
    line-height: 1;
    transform: rotate(180deg);
    gap: 32px;
    align-items: center;
    padding: 40px 48px 40px;
    background: linear-gradient(145deg, var(--madesa-red) 0%, rgba(225, 25, 35, 0.82) 40%, rgba(88, 19, 19, 0.9) 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.portal-home .hero-copy {
    max-width: 520px;
}

.portal-home .hero-copy h1 {
    font-size: clamp(32px, 4.6vw, 54px);
    margin-bottom: 18px;
    font-weight: 700;
    text-align: center;
}

.portal-home .hero-copy p {
    font-size: clamp(16px, 2.2vw, 20px);
    line-height: 1.6;
    margin-bottom: 26px;
}

.portal-home .hero-actions {
    display: flex;
    gap: clamp(10px, 2vw, 18px);
    flex-wrap: wrap;
}

.portal-home .hero-actions a {
    background: #fff;
    color: var(--madesa-red);
    padding: clamp(10px, 2vw, 14px) clamp(16px, 3vw, 26px);
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.portal-home .hero-actions a:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.portal-home .hero-actions a:nth-child(2) {
    color: var(--madesa-red);
    border: 1px solid rgba(255, 255, 255, 0.7);
}

.portal-home .hero-media {
    position: relative;
    display: flex;
    justify-content: center;
    padding: clamp(8px, 2vw, 16px);
    justify-self: center;
}
.portal-home .hero-media img {
    border-radius: 22px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.25);
    width: clamp(220px, 32vw, 360px);
    max-width: 100%;
    height: auto;
    object-fit: cover;
}


.portal-home .hero-media__image {
    transition: transform 0.3s ease;
}

.portal-home .hero-media__image--scaled {
    transform: scale(0.88);
    transform-origin: center;
}

.portal-home .hero-section.hero-section--app {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(clamp(240px, 36vw, 440px), 1fr);
    gap: clamp(22px, 5vw, 56px);
    align-items: center;
    padding: clamp(48px, 8vw, 120px) clamp(24px, 7vw, 80px) clamp(80px, 12vw, 140px);
    background: linear-gradient(145deg, var(--madesa-red) 0%, rgba(225, 25, 35, 0.82) 40%, rgba(88, 19, 19, 0.9) 100%);
    color: #fff;
    overflow: hidden;
}

.portal-home .hero-section.hero-section--app + .content-wrapper,
.portal-home .content-wrapper {
    margin-top: 0;
}

.portal-home .hero-section.hero-section--app + .content-wrapper {
    margin-top: -120px;
    padding-top: clamp(80px, 12vw, 140px);
}

.portal-home.portal-detail .hero-section.hero-section--app + main.content-wrapper {
    margin-top: clamp(32px, 7vw, 80px);
    padding-top: clamp(32px, 7vw, 90px);
}

.portal-home.portal-detail main.content-wrapper:not(.training-page) {
    margin-top: clamp(24px, 6vw, 64px);
    padding: clamp(32px, 6vw, 70px) clamp(20px, 6vw, 80px) clamp(110px, 14vw, 180px);
    box-shadow: none;
    background: transparent;
}

.portal-home.portal-detail main.content-wrapper:not(.training-page)::before {
    display: none;
}

.hero-section.hero-section--app .hero-media,
.hero-section.hero-section--app .hero-copy {
    position: relative;
    z-index: 1;
}

.portal-home .hero-section.hero-section--app .hero-media {
    display: flex;
    justify-content: center;
}

.portal-home .hero-section.hero-section--app .hero-media img {
    border-radius: 28px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 420px;
    object-fit: cover;
}
.portal-home .hero-section.hero-section--app::before {
    content: "";
    position: absolute;
    inset: -80px;
    background: url('data:image/svg+xml,%3Csvg width="160" height="160" viewBox="0 0 160 160" fill="none" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath opacity="0.08" d="M0 24L24 0H72L48 24H0Z" fill="white"/%3E%3C/svg%3E');
    pointer-events: none;
    mix-blend-mode: screen;
    opacity: 0.6;
}

.portal-home .hero-section.hero-section--app > * {
    position: relative;
    z-index: 1;
}

.portal-home .hero-section--app .hero-copy {
    justify-self: flex-start;
    text-align: left;
}

.portal-home .hero-section--app .hero-copy h1,
.portal-home .hero-section--app .hero-copy p {
    text-align: left;
}

.portal-home .hero-section--app .hero-media {
    justify-self: flex-end;
    padding: clamp(8px, 2vw, 18px);
}

.portal-home .hero-section--app .hero-media img {
    width: clamp(260px, 36vw, 420px);
}

.portal-home .hero-section--app .hero-actions {
    justify-content: flex-start;
}

/*.portal-home .hero-section + .content-wrapper {
    margin-top: clamp(28px, 6vw, 72px);
}
*/
.portal-home section {
    margin-bottom: clamp(36px, 6vw, 72px);
}

.portal-home section h2 {
    font-size: clamp(26px, 3vw, 36px);
    margin-bottom: 18px;
    color: #b71c1c;
    margin-top: 20px;
}

.portal-home .intro-card {
    background: #fff;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
    line-height: 1.7;
    border-top: 4px solid var(--madesa-red);
    width: min(720px, 92vw);
    height: auto;
}

.portal-home .app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(clamp(220px, 46vw, 320px), 1fr));
    gap: var(--card-gap);
}

.portal-home.no-hero .app-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 1020px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 1100px) {
    .portal-home.no-hero .app-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .card-login {
        padding: 16px 0;
    }

    .section-form {
        padding: 20px 16px;
        margin: 0 12px;
    }

    #login,
    #atualizar-senha {
        width: min(82vw, 230px);
    }

    .logo-madesa-login {
        width: 120px;
        height: auto;
        margin-bottom: 12px;
    }

    .portal-home.no-hero .app-grid {
        /* Handled by mobile-global.css: 3-column icon grid on small screens */
    }

    .portal-home .app-card .app-card-media {
        width: min(100%, 340px);
        height: auto;
        aspect-ratio: 1 / 1;
        max-height: none;
        object-fit: contain;
        object-position: center;
        margin: 0 auto;
        display: block;
    }
}

.portal-home .app-card {
    background: rgba(255,255,255,0.92);
    border-radius: var(--card-radius);
    padding: clamp(18px, 4vw, 28px);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.08);
    border-top: 4px solid rgba(225, 25, 35, 0.6);
    display: flex;
    flex-direction: column;
    gap: clamp(12px, 2.8vw, 18px);
    position: relative;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.portal-home .app-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.13);
}

.portal-home .app-card .app-card-media {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    border-radius: 14px;
}

.portal-home .app-card h3 {
    font-size: clamp(22px, 3vw, 28px);
    color: var(--madesa-red-dark);
}

.portal-home .app-card p {
    text-align: justify;
    line-height: 1.6;
    color: #333;
}

@media (max-width: 960px) {
    .portal-home .hero-section.hero-section--app {
        grid-template-columns: 1fr;
        justify-items: center;
        padding: clamp(28px, 8vw, 40px) clamp(20px, 7vw, 32px) clamp(80px, 12vw, 120px);
        text-align: center;
    }

    .portal-home .hero-section.hero-section--app .hero-copy,
    .portal-home .hero-section.hero-section--app .hero-actions {
        justify-self: center;
    }

    .portal-home .hero-section.hero-section--app .hero-copy,
    .portal-home .hero-section.hero-section--app .hero-copy h1,
    .portal-home .hero-section.hero-section--app .hero-copy p {
        text-align: center;
    }

    .portal-home .hero-section.hero-section--app .hero-media {
        justify-self: center;
        order: 2;
        flex: 0 0 auto;
        margin-right: 0;
    }
    .portal-home .hero-section.hero-section--app .hero-actions {
        justify-content: center;
    }
}

.portal-home .app-points {
    padding-left: 20px;
    line-height: 1.6;
    color: #444;
}

.portal-home .app-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 999px;
    background: var(--madesa-red);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
    width: 100%;
    box-sizing: border-box;
    margin-top: auto;
}

/* Stretched link: makes the entire card clickable */
.portal-home .app-link::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: var(--card-radius);
}

.portal-home .app-link:hover {
    background: var(--madesa-red-dark);
    transform: translateY(-1px);
}

.portal-home .text-content {
    text-align: left;
    line-height: 1.7;
    color: #333;
    width: 97%;
}

.portal-home .text-content p {
    text-align: left;
}

.portal-home .two-column {
    display: flex;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.portal-home .two-column article {
    background: #fff;
    border-radius: 16px;
    padding: 20px 24px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
    border-top: 4px solid rgba(225, 25, 35, 0.75);
}

.portal-home .two-column ul {
    padding-left: 18px;
    line-height: 1.6;
}

.portal-home .faq-list {
    gap: 18px;
    padding: 16px;
}

.portal-home details {
    background: #fff;
    border-radius: 18px;
    padding: 20px 26px;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.08);
    border-left: 4px solid rgba(225, 25, 35, 0.3);
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    margin: 20px;
}

.portal-home details::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(225, 25, 35, 0.06), transparent);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.portal-home details:hover,
 .portal-home details[open]::before {
    opacity: 1;
}

.portal-home summary {
    font-weight: 700;
    font-size: 18px;
    cursor: pointer;
    list-style: none;
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

.portal-home summary::-webkit-details-marker {
    display: none;
}

.portal-home summary::before {
    content: '';
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(225, 25, 35, 0.45);
    flex-shrink: 0;
    transition: background 0.2s ease;
}

.portal-home summary::after {
    content: '+';
    margin-left: auto;
    font-size: 20px;
    transition: transform 0.2s ease;
}

.portal-home details:hover summary::before,
.portal-home details:focus-within summary::before {
    background: var(--madesa-red);
}

.portal-home details[open] summary {
    color: var(--madesa-red);
}

.portal-home details[open] summary::after {
    transform: rotate(45deg);
}

.portal-home details p,
.portal-home details ul,
.portal-home details ol {
    margin-top: 14px;
    line-height: 1.7;
}

.portal-home .qr-card,
.portal-home .contact-card {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    background: #ffffff;
    padding: 24px;
    border-radius: 18px;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.08);
    border-top: 4px solid rgba(225, 25, 35, 0.7);
}

.portal-home .qr-media {
    display: flex;
    align-items: center;
    justify-content: center;
}

.portal-home .qr-image {
    max-width: 220px;
    width: min(60vw, 220px);
    border-radius: 16px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.portal-dashboard {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at 15% 15%, rgba(225, 25, 35, 0.12), transparent 50%),
        radial-gradient(circle at 90% 10%, rgba(124, 20, 26, 0.12), transparent 45%),
        linear-gradient(135deg, #fff7f7 0%, #ffffff 42%, #ffeef0 100%);
    color: #2b2b2b;
    font-family: 'Roboto', Arial, sans-serif;
}

.portal-dashboard .page-wrapper {
    min-height: 160vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 64px 32px;
}

.portal-dashboard .dashboard-shell {
    width: min(1280px, 100%);
    background: rgba(255, 255, 255, 0.95);
    border-radius: 36px;
    box-shadow: 0 45px 90px rgba(225, 25, 35, 0.18);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    backdrop-filter: blur(8px);
}

.portal-dashboard .dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 32px 48px;
    background-color: #473434;
    border-bottom: 1px solid rgba(225, 25, 35, 0.12);
}

.portal-dashboard .dashboard-brand {
    display: flex;
    align-items: center;
    gap: 18px;
}

.portal-dashboard .dashboard-brand-title {
    display: flex;
    flex-direction: column;
    font-size: 16px;
    line-height: 1.3;
}

.portal-dashboard .dashboard-brand-label {
    text-transform: uppercase;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 2px;
    color: #a11c1c;
}

.portal-dashboard .dashboard-brand-title strong {
    font-size: 18px;
    font-weight: 700;
    color: #5b1e1e;
}

.portal-dashboard .dashboard-nav {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.portal-dashboard .dashboard-nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    color: #7b1e1e;
    background: rgba(225, 25, 35, 0.08);
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.portal-dashboard .dashboard-nav-link:hover {
    transform: translateY(-1px);
    background: rgba(225, 25, 35, 0.18);
    color: #5b1e1e;
}

.portal-dashboard .dashboard-nav-link.is-active {
    background: linear-gradient(120deg, rgba(225, 25, 35, 0.85), rgba(124, 20, 26, 0.85));
    color: #fff;
    box-shadow: 0 10px 22px rgba(225, 25, 35, 0.25);
}

.portal-dashboard .dashboard-user {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border-radius: 14px;
    background: rgba(225, 25, 35, 0.08);
    font-weight: 600;
    color: #5b1e1e;
}

.portal-dashboard .dashboard-user-avatar {
    font-size: 18px;
}

.portal-dashboard .dashboard-hero {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    padding: 52px 56px 68px;
    background: linear-gradient(135deg, rgba(225, 25, 35, 0.92), rgba(124, 20, 26, 0.88));
    color: #fff;
}

.portal-dashboard .dashboard-hero-copy {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.portal-dashboard .dashboard-hero-copy h1 {
    font-size: clamp(34px, 4.5vw, 48px);
    font-weight: 700;
}

.portal-dashboard .dashboard-hero-copy p {
    font-size: clamp(16px, 2.2vw, 18px);
    line-height: 1.6;
    margin: 0;
    text-align: left;
}

.portal-dashboard .dashboard-tag {
    display: inline-flex;
    align-self: flex-start;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.portal-dashboard .dashboard-hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.portal-dashboard .dashboard-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    background: #fff;
    color: #b02123;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.portal-dashboard .dashboard-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.2);
}

.portal-dashboard .dashboard-button.ghost {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.7);
    color: #fff;
    box-shadow: none;
}
.portal-dashboard .dashboard-hero-media {
    display: flex;
    align-items: center;
    justify-content: center;
}

.portal-dashboard .dashboard-hero-media img {
    width: 100%;
    max-width: 500px;
    border-radius: 26px;
    box-shadow: 0 26px 54px rgba(0, 0, 0, 0.28);
    object-fit: cover;
}

.portal-dashboard .dashboard-main {
    padding: 64px 56px 56px;
    background: rgba(255, 255, 255, 0.92);
}

.portal-dashboard .dashboard-section-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 32px;
}

.portal-dashboard .dashboard-section-header h2 {
    font-size: clamp(26px, 3vw, 32px);
    color: #b02123;
    text-align: left;
}

.portal-home .hero-section {
    display: grid;
    gap: clamp(20px, 5vw, 48px);
    align-items: center;
    position: relative;
}
.portal-dashboard .dashboard-section-header p {
    max-width: 520px;
    text-align: left;
    color: #5c5c5c;
    line-height: 1.5;
}

.portal-dashboard .dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
}

.portal-dashboard .dashboard-card {
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.96), rgba(255, 235, 236, 0.96));
    border-radius: 26px;
    padding: 32px;
    box-shadow: 0 28px 52px rgba(225, 25, 35, 0.16);
    border: 1px solid rgba(225, 25, 35, 0.12);
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.portal-dashboard .dashboard-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 30px 60px rgba(225, 25, 35, 0.2);
}

.portal-dashboard .dashboard-card h3 {
    font-size: clamp(22px, 2.6vw, 26px);
    color: #7b1e1e;
    text-align: left;
}

.portal-dashboard .dashboard-card p {
    text-align: left;
    line-height: 1.6;
    color: #494949;
    flex: 1;
}

.portal-dashboard .dashboard-card-icon {
    font-size: 34px;
    background: rgba(225, 25, 35, 0.12);
    width: 60px;
    height: 60px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b02123;
}

.portal-dashboard .dashboard-link {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #b02123;
    text-decoration: none;
    padding: 10px 0;
}

.portal-dashboard .dashboard-link::after {
    content: '\2192';
    font-size: 18px;
}

.portal-dashboard .dashboard-link:hover {
    color: #7b1e1e;
}

.portal-dashboard .dashboard-footer {
    margin-top: auto;
    padding: 26px 36px;
    text-align: center;
    font-size: 14px;
    color: #6b6b6b;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.78));
    border-top: 1px solid rgba(225, 25, 35, 0.12);
}

.portal-home .qr-placeholder,
.portal-home .card-placeholder {
    border: 2px dashed rgba(225, 25, 35, 0.45);
    border-radius: 12px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b71c1c;
    font-weight: 600;
    text-align: center;
}

.account-page {
    padding: 60px 20px 40px;
    display: flex;
    justify-content: center;
}

.account-wrapper {
    width: 100%;
    max-width: 960px;
    display: grid;
    gap: 28px;
}

.account-header h1 {
    text-align: left;
    font-size: clamp(26px, 4vw, 36px);
}

.account-lead {
    text-align: left;
    color: #5c5c5c;
    line-height: 1.6;
    margin-top: 8px;
}

.account-grid {
    display: grid;
    gap: 24px;
}

.account-card {
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
    padding: 28px;
    display: grid;
    gap: 20px;
}

.account-card h2 {
    font-size: clamp(20px, 3vw, 26px);
    color: #7b1e1e;
    text-align: left;
}

.account-details {
    margin: 0;
    display: grid;
    gap: 16px;
}

.account-detail {
    display: grid;
    gap: 4px;
}

.account-detail dt {
    font-weight: 600;
    color: #b02123;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 12px;
}

.account-detail dd {
    margin: 0;
    font-size: 16px;
    color: #2f2f2f;
}

.account-support {
    list-style: disc inside;
    color: #3e3e3e;
    line-height: 1.6;
    display: grid;
    gap: 8px;
}

.account-support a {
    color: #b02123;
    text-decoration: underline;
}

.account-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.account-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-radius: 999px;
    font-weight: 600;
    background: var(--madesa-red);
    color: #ffffff;
    border: 1px solid transparent;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.account-action:hover,
.account-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 20px rgba(225, 25, 35, 0.2);
}

.account-action.ghost {
    background: #ffffff;
    color: #b02123;
    border-color: rgba(225, 25, 35, 0.35);
}

@media (max-width: 640px) {
    .account-actions {
        justify-content: space-between;
        gap: 8px;
    }

    .account-action {
        flex: 1 1 calc(33.333% - 8px);
        padding: 10px 12px;
        font-size: 0.85rem;
        min-width: 0;
    }
}

.account-form {
    display: grid;
    gap: 18px;
}

.account-form-field {
    display: grid;
    gap: 10px;
}

.account-form-field label {
    font-weight: 600;
    color: #3a3a3a;
}

.account-form-field input {
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.account-form-field input:focus {
    border-color: var(--madesa-red);
    box-shadow: 0 0 0 3px rgba(225, 25, 35, 0.2);
    outline: none;
}

.account-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-start;
}

.account-submit {
    background: var(--madesa-red);
    color: #ffffff;
    border: none;
    border-radius: 999px;
    padding: 12px 24px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.account-feedback {
    border-radius: 12px;
    padding: 14px 18px;
    font-weight: 500;
}

.account-feedback.sucesso {
    background: #e9f8ef;
    color: #146534;
    border: 1px solid rgba(20, 101, 52, 0.2);
}

.account-feedback.erro {
    background: #fdecee;
    color: #861721;
    border: 1px solid rgba(134, 23, 33, 0.2);
}

.account-action.ghost:hover {
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.08);
}

@media (min-width: 768px) {
    .account-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .account-form-actions {
        justify-content: flex-start;
    }
}
.portal-home footer {
    margin-top: auto;
    background: var(--madesa-red-dark);
    color: #fdf3f3;
    padding: clamp(18px, 4vw, 32px) clamp(20px, 5vw, 48px);
    text-align: center;
    font-size: 14px;
}

@media (max-width: 768px) {
    .portal-home .site-header .header-row {
        gap: 16px;
        padding: 18px 20px;
    }

    .portal-dashboard .page-wrapper {
        padding: 24px 16px;
    }

    .portal-dashboard .dashboard-shell {
        border-radius: 24px;
    }

    .portal-dashboard .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
        padding: 24px;
    }

    .portal-dashboard .dashboard-nav {
        width: 100%;
        justify-content: flex-start;
    }

    .portal-dashboard .dashboard-user {
        align-self: flex-end;
    }

    .portal-dashboard .dashboard-hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 36px 28px 44px;
    }

    .portal-dashboard .dashboard-hero-copy {
        align-items: center;
    }

    .portal-dashboard .dashboard-tag {
        align-self: center;
    }

    .portal-dashboard .dashboard-hero-copy p {
        text-align: center;
    }

    .portal-dashboard .dashboard-hero-actions {
        justify-content: center;
    }

    .portal-dashboard .dashboard-main {
        padding: 40px 24px 32px;
    }

    .portal-home .main-nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .portal-home .content-wrapper {
        /*margin-top: -60px;*/
        padding: 110px 20px 60px;
    }
}

select,
.form-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border: 1px solid #cfd4dc;
    border-radius: 8px;
    background-color: #fff;
    color: #222;
    padding: 8px 34px 8px 10px;
    line-height: 1.3;
}

/* Hard reset to avoid white line above header */
html, body { margin: 0 !important; padding: 0 !important; }
.portal-home .site-header, .cab { margin-top: 0 !important; border-top: 0 !important; }

