@import url('https://fonts.googleapis.com/css2?family=Roboto+Condensed:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue:wght@400;700&display=swap');
body {
    font-family: "Roboto Condensed", sans-serif;
    font-weight: 400;
    display: block;
    margin: 8px;
    font-size: 1rem;
}

h1, h2, h3, h4, h5, h6 {
    font-family: "Bebas Neue", sans-serif;
    font-weight: normal;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.8rem;
}

a {
    color:#2f85ae;
    -webkit-transition:all 0.2s linear;
    transition:all 0.2s linear;
}

.sensedeco {
    text-decoration: none;
}

.nodecoration {
    text-decoration: none;
    color: white;
}

.nodeco {
    text-decoration: none !important;
    color: black;
}

.pestanya {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;              /* important per permetre el “shrink” del fill amb scroll */
  width: 100%;
}

.pestanyamenys {
    display: flex; /* Permet col·locar elements fills un al costat de l'altre */
    gap: 1rem; /* Espai entre elements */
    width: 100%;
    align-items: flex-start; /* Per alinear els elements verticalment */
}

.text.p33 {
    flex: 1 1 31%;
}

.pestanya.p50 {
    width: 48%;
}

.pestanya.p20 {
    width: 18%;
}

.pestanya.p100 {
    width: 100%;
}

/* Estil per al títol */
.titolpestanya {
    display: inline-block;
    padding: 1rem 1rem;
    color: white;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
    border-radius: 0;
    white-space: nowrap;
    margin-bottom: 0;
    box-sizing: border-box;
    text-align: left;
    flex: 0 0 auto;
    align-self: flex-start;   /* evita l’estirament a l’amplada */
    width: fit-content;       /* mida segons el contingut */
    max-width: 100%;          /* per si el contingut és molt llarg */
}

@media (width <= 900px) {
  .titolpestanya {
    padding: 0.5rem;
    margin-top: 0.5rem;
  }
}

/* Estil per al text */
.contingutpestanya {
    padding: 1.5rem;
    border: 0.3rem solid;
    line-height: 1.4;
    background-color: white;
    border-radius: 0;
    margin-top: 0;
    text-align: left;
    overflow-x: auto !important; /* Activa el scroll horitzontal */
    align-content: center;
    height: auto;               /* sobreescriu l'alçada fixa anterior */
    flex: 1 1 60%;              /* 80% del sobrant */
    min-height: 0;              /* perquè el scroll funcioni bé */
    overflow: auto;             /* conserva scroll si cal (horitz./vert.) */
}


.contingutpestanya-messages {
    padding: 1.5rem;
    border: 0.3rem solid;
    line-height: 1.4;
    background-color: white;
    border-radius: 0;
    margin-top: 0;
    text-align: left;
    max-width: 35rem;
}


fieldset {
    border: 0.3rem solid;
    width: 100%;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1rem;
    margin-bottom: 1rem;
}

fieldset a{
    text-decoration: none !important;
    color: grey !important;
}
/* Rosa */
.text-rosa {
    color: #e55381;
}

.fons-rosa {
    background-color: #e55381 !important;
}

.fons-rosa:before {
    color: #e55381 !important;
    background-color: transparent;
}

.vora-rosa {
    border-color: #e55381 !important;
}

/* Blaucel */
.text-blaucel {
    color: #8ec3c3 !important;
}
.fons-blaucel {
    background-color: #8ec3c3 !important;
}
.vora-blaucel {
    border-color: #8ec3c3;
}

/* Lila */
.text-lila {
    color: #b2abbe;
}
.fons-lila {
    background-color: #b2abbe !important;
}
.vora-lila {
    border-color: #b2abbe;
}

/* Taronja */
.text-taronja {
    color: #feb20e;
}
.fons-taronja {
    background-color: #feb20e !important;
}
.vora-taronja {
    border-color: #feb20e !important;
}

/* Blaumari */
.text-blaumari {
    color: #708090;
}
.fons-blaumari {
    background-color: #708090 !important;
}
.vora-blaumari {
    border-color: #708090 !important;
}

/* Estilització del dropdown */
.dropdown-blaumari {
    font-family: 'Roboto Condensed', sans-serif;
    border: 4px solid #708090; /* Vora de 2px de color blanc */
    border-color: #708090;
    cursor: pointer; /* Canvia el cursor a mà */
    padding: 0.5rem; /* Espaiat intern */
    font-size: 1rem;
}

.diesestat {
    font-size: 1em;
    padding: 0.5em;
    font-family: 'Roboto Condensed', sans-serif;
    width: 2.5rem;
    margin-left: 0.5rem;
    margin-right: 0.5rem;
    border: 4px solid #708090; /* Vora de 2px de color blanc */
    border-color: #708090;
    cursor: pointer; /* Canvia el cursor a mà */
}

.dropdown-taronja {
    padding: 0.5em;
    font-family: 'Roboto Condensed', sans-serif;
    border: 4px solid #feb20e; /* Vora de 2px de color blanc */
    border-color: #feb20e;
    cursor: pointer; /* Canvia el cursor a mà */
}

.dropdown-blaucel {
    padding: 0.5em;
    font-family: 'Roboto Condensed', sans-serif;
    border: 4px solid #8ec3c3; /* Vora de 2px de color blanc */
    border-color: #8ec3c3;
    cursor: pointer; /* Canvia el cursor a mà */
}

.dropdown-lila {
    padding: 0.5em;
    font-family: 'Roboto Condensed', sans-serif;
    border: 4px solid #b2abbe; /* Vora de 2px de color blanc */
    border-color: #b2abbe;
    cursor: pointer; /* Canvia el cursor a mà */
}

.dropdown-verd {
    padding: 0.5em;
    font-family: 'Roboto Condensed', sans-serif;
    border: 4px solid #aed581; /* Vora de 2px de color blanc */
    border-color: #aed581;
    cursor: pointer; /* Canvia el cursor a mà */
}

.separator {
    width: 0.2rem;
    margin: 0 1rem; /* Espaiar el separador dels botons */
}

.esquerrath {
    text-align: left !important;
    padding-left: 0.5rem !important;
}

.dalt {
    vertical-align: top !important;
}

.th-flex {
    display: flex;
    align-items: center;
    justify-content: space-between; /* o flex-start */
}

.th-flex .botomini {
    margin: 0.1rem !important;
}



/* Verd */
.text-verd {
    color: #aed581;
}
.fons-verd {
    background-color: #aed581 !important;
}
.vora-verd {
    border-color: #aed581 !important;
}

/* Gris */
.text-gris {
    color: #bfbfbf;
}
.fons-gris {
    background-color: #bfbfbf;
}
.vora-gris {
    border-color: #bfbfbf;
}

/* Ocre */
.text-ocre {
    color: #d8baa9;
}
.fons-ocre {
    background-color: #d8baa9;
}
.vora-ocre {
    border-color: #d8baa9;
}

/* Grisclar */
.text-grisclar {
    color: #cfcfcf;
}
.fons-grisclar {
    background-color: #cfcfcf;
}
.vora-grisclar {
    border-color: #cfcfcf;
}

/* Blanc */
.text-blanc {
    color: #ffffff;
}
.fons-blanc {
    background-color: #ffffff !important;
}
.vora-blanc {
    border-color: #ffffff;
}

/* Negre */
.text-negre {
    color: #0e1111;
}
.fons-negre {
    background-color: #0e1111;
}
.vora-negre {
    border-color: #0e1111;
}


.taula-columnar.rosa th {
    background-color: #e55381;
}

.taula-columnar.rosa td:nth-child(even) {
    background-color: #f8b8c9; /* Dos tons més pujat que abans */
}

.taula-columnar.rosa td:nth-child(odd) {
    background-color: #fbd9e3;
}

.taula-columnar.blaucel th {
    background-color: #8ec3c3;
}

.taula-columnar.blaucel td:nth-child(even) {
    background-color: #c7e8e8; /* Dos tons més pujat que abans */
}

.taula-columnar.blaucel td:nth-child(odd) {
    background-color: #e4f4f4;
}

.taula-columnar.lila th {
    background-color: #b2abbe;
}

.taula-columnar.lila td:nth-child(even) {
    background-color: #e2dcea; /* Dos tons més pujat que abans */
}

.lilafosc {
    background-color: #e2dcea;
}

.taula-columnar.lila td:nth-child(odd) {
    background-color: #f1edf6;
}

.taula-columnar.taronja th {
    background-color: #feb20e;
}

.taula-columnar.taronja td:nth-child(even) {
    background-color: #ffefdb; /* Dos tons més pujat que abans */
}

.taula-columnar.taronja td:nth-child(odd) {
    background-color: #ffdbab;
}

.taula-columnar.blaumari th {
    background-color: #708090;
}

.taula-columnar.blaumari td:nth-child(even) {
    background-color: #c8d3d7; /* Dos tons més pujat que abans */
}

.taula-columnar.blaumari td:nth-child(odd) {
    background-color: #e8ebed;
}

.taula-columnar.verd th {
    background-color: #aed581;
}

.taula-columnar.verd td:nth-child(even) {
    background-color: #edf7e7; /* Dos tons més pujat que abans */
}

.taula-columnar.verd td:nth-child(odd) {
    background-color: #d3e8b8;
}

.taula-columnar.gris th {
    background-color: #bfbfbf;
}

.taula-columnar.gris td:nth-child(even) {
    background-color: #d8d8d8; /* Dos tons més pujat que abans */
}

.taula-columnar.gris td:nth-child(odd) {
    background-color: #f2f2f2;
}

.taula-columnar.ocre th {
    background-color: #d8baa9;
}

.taula-columnar.ocre td:nth-child(even) {
    background-color: #dfcfc5; /* Dos tons més pujat que abans */
}

.taula-columnar.ocre td:nth-child(odd) {
    background-color: #f2e5df;
}

.taula-columnar.grisclar th {
    background-color: #cfcfcf;
}

.taula-columnar.grisclar td:nth-child(even) {
    background-color: #e6e6e6; /* Dos tons més pujat que abans */
}

.taula-columnar.grisclar td:nth-child(odd) {
    background-color: #f8f8f8;
}

.taula-columnar.negre th {
    background-color: #0e1111;
}

.taula-columnar.negre td:nth-child(even) {
    background-color: #d8d8d8; /* Dos tons més pujat que abans */
}

.taula-columnar.negre td:nth-child(odd) {
    background-color: #f5f5f5;
}
.taula-filar.rosa th {
    background-color: #e55381;
}

.taula-filar.rosa tr:nth-child(even) {
    background-color: #f8b8c9; /* Dos tons més pujat */
}

.taula-filar.rosa tr:nth-child(odd) {
    background-color: #fbd9e3; /* Lleugerament més pujat */
}

.taula-filar.blaucel th {
    background-color: #8ec3c3;
}

.taula-filar.blaucel tr:nth-child(even) {
    background-color: #c7e8e8; /* Dos tons més pujat */
}

.taula-filar.blaucel tr:nth-child(odd) {
    background-color: #e4f4f4; /* Lleugerament més pujat */
}

.taula-filar.lila th {
    background-color: #b2abbe;
}

.taula-filar.lila tr:nth-child(even) {
    background-color: #e2dcea; /* Dos tons més pujat */
}

.taula-filar.lila tr:nth-child(odd) {
    background-color: #f1edf6; /* Lleugerament més pujat */
}

.taula-filar.taronja th {
    background-color: #feb20e;
}

.taula-filar.taronja tr:nth-child(even) {
    background-color: #ffdbab; /* Dos tons més pujat */
}

.taula-filar.taronja tr:nth-child(odd) {
    background-color: #ffefdb; /* Lleugerament més pujat */
}

.taula-filar.blaumari th {
    background-color: #708090;
}

.taula-filar.blaumari tr:nth-child(even) {
    background-color: #c8d3d7; /* Dos tons més pujat */
}

.taula-filar.blaumari tr:nth-child(odd) {
    background-color: #e8ebed; /* Lleugerament més pujat */
}

.taula-mono.blaumari th {
    background-color: #708090; /* mateix capçalera que blaumari */
}

.taula-mono.blaumari tr {
    background-color: #e8ebed;
}

.taula-filar.verd th {
    background-color: #aed581;
}

.taula-filar.verd tr:nth-child(even) {
    background-color: #d3e8b8; /* Dos tons més pujat */
}

.taula-filar.verd tr:nth-child(odd) {
    background-color: #edf7e7; /* Lleugerament més pujat */
}

.taula-filar.gris th {
    background-color: #bfbfbf;
}

.taula-filar.gris tr:nth-child(even) {
    background-color: #d8d8d8; /* Dos tons més pujat */
}

.taula-filar.gris tr:nth-child(odd) {
    background-color: #f2f2f2; /* Lleugerament més pujat */
}

.taula-filar.ocre th {
    background-color: #d8baa9;
}

.taula-filar.ocre tr:nth-child(even) {
    background-color: #dfcfc5; /* Dos tons més pujat */
}

.taula-filar.ocre tr:nth-child(odd) {
    background-color: #f2e5df; /* Lleugerament més pujat */
}

.taula-filar.grisclar th {
    background-color: #cfcfcf;
}

.taula-filar.grisclar tr:nth-child(even) {
    background-color: #e6e6e6; /* Dos tons més pujat */
}

.taula-filar.grisclar tr:nth-child(odd) {
    background-color: #f8f8f8; /* Lleugerament més pujat */
}

.taula-filar.negre th {
    background-color: #0e1111;
}

.taula-filar.negre tr:nth-child(even) {
    background-color: #d8d8d8; /* Dos tons més pujat */
}

.taula-filar.negre tr:nth-child(odd) {
    background-color: #f5f5f5; /* Lleugerament més pujat */
}

/* Quan la pantalla és petita, apila'ls */
@media (max-width: 900px) {
  .desplegables {
    height: auto;            /* perquè creixi en alçada */
    padding: 0.5rem 1rem;
  }
  .desplegables-inputs {
    flex-direction: column;  /* un sota l’altre */
    width: 100%;
    gap: 0.5rem;
  }
  .desplegables-inputs select,
  .desplegables-inputs .dropdown-blaucel {
    width: 100%;             /* que ocupin tot l’ample */
    max-width: 100%;
  }
}



.boto {
    font-family: 'Bebas Neue', sans-serif;
    color: #ffffff;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Suavitat en els efectes */
}
.boto:hover {
    transform: scale(1.15); /* Augmenta un 15% la mida */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Afegeix una ombra subtil */
}




.reclam-container {
    width: 100%;
    height: 2.5rem;
    display: flex;
    align-items: center; /* Centra verticalment la imatge i el text *//* Espai entre la imatge i el text */
    cursor: default;
}

.reclam-container img {
    pointer-events: none; /* Evita que les imatges siguin clicables */
}

.reclam-container:hover {
    background-color: inherit; /* Evita canvis d'estil en passar el cursor */
    transition: none; /* Elimina les transicions en hover */
}


/* Classe genèrica per a columnes */
.divcols {
    display: flex; /* Configura un contenidor flexible per a les columnes */
    gap: 1rem; /* Espai entre columnes */
}

.divcols .col {
    flex: 1 1 0; /* Totes les columnes tenen la mateixa amplada */
    display: flex;
    flex-direction: column; /* Les taules es col·loquen en vertical dins de cada columna */
    gap: 1rem; /* Espai entre taules dins de la columna */
    max-width: 100%; /* Limita l'amplada màxima de les columnes */
}

.col.senseflex {
  flex: initial !important; /* equival a 0 1 auto */
}

.divcols.primeraestreta {
    display: flex;
    flex-wrap: nowrap; /* Les columnes no es trenquen en una nova línia */
    gap: 1rem; /* Espai entre columnes */
}

.divcols.primeraestreta > .col:first-child {
    flex: 0 0 24%; /* Primera columna ocupa exactament el 15% */
}

.divcols.primeraestreta > .col:not(:first-child) {
    flex: 1; /* Les altres columnes s'ajusten automàticament */
}

.divcols.primeramitjana {
    display: flex;
    flex-wrap: nowrap; /* Les columnes no es trenquen en una nova línia */
    gap: 1rem; /* Espai entre columnes */
}

.divcols.primeramitjana > .col:first-child {
    flex: 0 0 34%; /* Primera columna ocupa exactament el 15% */
}

.divcols.primeramitjana > .col:not(:first-child) {
    flex: 1; /* Les altres columnes s'ajusten automàticament */
}

th.gran {
    font-size: 1.5rem;
}

th.alt {
    height: 2.8rem;
}


.moltpetit {
    font-size: 0.6rem;
    padding: 0.5rem;
}

.petit {
    font-size: 0.8rem;
    padding: 0.5rem;
}

.mitja {
    font-size: 1rem;
    padding: 0.5rem;
}

.mitja2 {
    font-size: 1rem;
    padding: 0rem;
}

.gran {
    font-size: 1.25rem;
    padding: 0.5rem;
}

.gran2 {
    font-size: 1.5rem;
    padding: 0rem
}

.logo {
    height:3rem;
}

.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4rem;
    padding: 0 1rem;
    box-sizing: border-box;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999999; /* Per assegurar que la barra es manté al davant */
    background-color: white;

}

.top-bar-img {
    max-height: 100%;
    width: auto;
    height: auto; /* Assegura que la imatge es redimensiona dins del div */
}
.top-bar-botons {
    display: flex;
    gap: 0.2rem; /* Espai entre botons */
}

.menu-opcions-mobile {
    display: none;
    margin-bottom: 1rem;
}

.mobile { display:none; }

@media (max-width: 900px) {
  /* Replantegem la top-bar en grid per centrar el logo */
  .assistencies {
    display: none !important;
  }
  .top-bar {
    display: grid;
    grid-template-columns: auto 1fr auto;   /* esquerra | centre | dreta (2 icones) */
    align-items: center;
    height: 4rem;
    margin-top: 0.3rem;
  }

  .mobile { display:flex; }

  .mobile-nav-btn {
    display: inline-flex;
    align-items: center; justify-content: center;
    cursor: pointer;
  }
  .mobile-nav-btn img { max-height: 1.75rem; width: auto; }

  .top-bar-img {
    justify-self: center;         /* logo centrat */
    max-height: 2.25rem;
  }

  /* Contenidor de botons a la dreta */
  .top-bar-botons {
    justify-self: end;
    display: inline-flex;
    gap: .5rem;
  }

  /* Amaga TOT el que hi hagi dins .top-bar-botons... */
  .top-bar-botons > * { display: none !important; }
  /* ...excepte els marcats per mantenir en mòbil */
  .top-bar-botons > .keep-mobile { display: inline-flex !important; }

  /* Icon-only: oculta el text dels botoimgtext però manté la icona */
  .icon-only .botoimgtext,
  .icon-only [class*="botoimgtext"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem; height: 2.75rem;
    padding: .25rem;
    border-radius: .75rem;
    overflow: hidden;
    white-space: nowrap;
  }
  /* Intents segurs per ocultar el text del teu component */
  .icon-only .botoimgtext .text,
  .icon-only .botoimgtext .linia1,
  .icon-only .botoimgtext .linia2,
  .icon-only .botoimgtext .titol,
  .icon-only .botoimgtext span,
  .icon-only .botoimgtext strong,
  .icon-only .botoimgtext em,
  .icon-only .botoimgtext p { display: none !important; }
  .icon-only img { max-height: 1.75rem; width: auto; }

  /* La sidebar passa a estar oculta per defecte en mòbil */
  .sidebar { display: none; }

  /* Quan s’obri, ocupa TOTA la pantalla amb els botons centrats */
  .sidebar.is-open {
    display: flex !important;
    position: fixed; inset: 0;
    width: 100vw; height: 100dvh;
    background: #ffffff;
    z-index: 2000;
    align-items: stretch;
    justify-content: flex-start;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 1rem;
    padding: 2rem;
    padding-top: calc(2rem + 4rem);
    overflow: auto;
  }

  /* Opcional: quan el menú està obert, evita scroll del body */
  body.no-scroll { overflow: hidden; }

  .menu-opcions-mobile {
    display: block;
  }

  .menu-opcions-mobile .col .botomenuppal-wrapper:first-child {
    margin-top: 4rem;
  }

  .marge-superior-mobile {
    margin-top: 4rem;
  }

  .dropdown-blaumari.marge-superior-mobile {
    display: block;
  }

  .marge-superior-1rem {
    margin-top: 1rem;
  }
}


.main {
    margin-top: 4rem; /* Espai per col·locar-se per sota de la top-bar */
    margin-left: 10%; /* Espai per col·locar-se a la dreta de la sidebar */
    box-sizing: border-box;
    min-height: 85vh;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

@media (width <= 900px) {
  .main {
    margin-left: 0; 
    min-height: 83vh;
    max-height: 83vh;}
}


.camp-comentari {
    width: 100%;
    height: 100%;
    font-size: 0.9rem;
    resize: vertical; /* permet redimensionar verticalment */
}


.sidebar {
    margin-top: 1.5vh;
    padding: 1vh;
    display: flex;
    gap: 1vh;
    flex-wrap: wrap;
    flex-direction: column;
    width: 10%;
    height: calc(100vh - 4rem); /* Alçada restant per sota de la top-bar */
    position: fixed;
    top: 4rem; /* Per col·locar-la just sota la top-bar */
    left: 0; /* Col·loca la sidebar a l'esquerra */
    box-sizing: border-box;
    background-color: white;
}

/* Estat per defecte en mòbil: fora de pantalla */
@media (max-width: 900px) {
  .sidebar {
    width: 100vw;
    flex-wrap: nowrap;
    transform: translateX(-100%);
    transition: transform 200ms ease;
    z-index: 1000;
  }
}

/* Quan cliques el botó, afegeixes .is-open a .sidebar */
.sidebar.is-open { transform: translateX(0); }


.esquerra {
    text-align: left !important;
    justify-content: left !important;
    align-content: center;
}

.centre {
    text-align: center;
}

.dreta {
    text-align: right;
}

.negreta {
    font-weight: bold;
}

.cursiva {
    font-style: italic;
}

.peutaula {
    font-family: "Bebas Neue", sans-serif;
}

.taula {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0; 
}

.taula a {
    text-decoration: none !important;
    color: inherit;
}

.taula th {
    font-family: "Bebas Neue", sans-serif;
    font-weight: normal;
    color: #ffffff;
    border: 2px solid white;
    padding-left: 1vh;
    padding-right: 1vh;
    
}

.contenidor divcentre a {
    position: relative;
    display: inline-block;
}

.contenidor divcentre a:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    padding: 5px;
    border-radius: 3px;
    white-space: nowrap;
}

@media (max-width: 700px) {
  .filtres-xs { display: block; }
}

.is-hidden { display: none !important; }


.fixed-header {
    position: sticky;
    top: -1.5rem; /* Primera fila de capçalera */
    z-index:9;
}

.fixed-second-header {
    position: sticky;
    top: -1.5rem; /* Primera fila de capçalera */
    z-index:9;
}

.fixed-header tr:first-child th {
    border-top: solid 1.5rem white !important;
}

.login {
    width: 50rem;
    margin-top: -10rem;
}

@media (max-width: 900px) {
    .login {
        width: 100%;
        margin-top: -10rem;
    }
    table.taula-filar tr.novora,
    table.taulavertical tr.novora {
      border-top: none !important;
      border-bottom: none !important;
    }

  /* Desactiva sticky i qualsevol desplaçament */
  .fixed-header,
  .fixed-second-header {
    z-index: 9 !important;
    margin: 0 !important;
    border: 0 !important;   /* per si el contenidor té vora */
    box-sizing: border-box;
  }

  /* Treu el “fals marge” blanc i qualsevol vora del header */
  .fixed-header tr:first-child th,
  .fixed-second-header tr:first-child th {
    border-top: 0 !important;
    border-color: black !important;
  }

  /* Sense vores al header (i opcionalment a les cel·les del header) */
  .fixed-header th,
  .fixed-second-header th {
    position: sticky;
    border: 0 !important;
    width: 2000rem;
    /* opcional: menys padding si vols header més compacte
    padding: .25rem .5rem;
    */
  }
}


.contenidor {
    display: flex;
    flex-wrap: wrap; /* Espai entre elements */
}

.separacio {
    margin-top:4rem;
    gap: 4rem;
}

.files-estretes tbody tr td {
    padding-top: 0.2rem;
    padding-bottom: 0.2rem;
    padding-left: 0.4rem;
    padding-right: 0.4rem;
}


.botofix {
    width: 2.5rem;
    height: 2.5rem;
    margin:0.1rem;
    cursor: pointer;
}

.botofix img {
    margin: 0.5rem; /* Aplica un marge al voltant de les imatges */
    max-height: 100%; /* Assegura que les imatges no excedeixin l’alçada del contenidor */
    object-fit: contain; /* Ajusta les imatges per mantenir la proporció dins del contenidor */
    cursor: pointer;
}


.botomini {
    width: 1rem; /* Amplada fixa del contenidor */
    height: 1rem; /* Alçada fixa del contenidor */
    display: flex; /* Centrar la imatge */
    align-items: center; /* Centrar verticalment */
    justify-content: center; /* Centrar horitzontalment */
    margin-right:0.2rem;
    margin-left:0.2rem;
    padding: 0.4rem;
    padding-top: 0.5rem !important;
    cursor: pointer;
}

.botomini img {
    max-width: 100%; /* Ajusta l'amplada màxima al contenidor */
    max-height: 100%; /* Ajusta l'alçada màxima al contenidor */
    object-fit: contain; /* Manté la proporció */
    cursor: pointer;

}
.botomini:hover {
    cursor: pointer;
}


.botoform {
    width: 7rem;
    min-height: 2.5rem;
    margin: 0.2rem;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
    color: #ffffff;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Suavitat en els efectes */
    padding-left: 0.8rem;
    padding-right: 0.8rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    box-sizing: border-box;
    float: right; /* Mou el botó a la dreta */
}


.botoflex {
    width: 100%;
    min-height: 2.5rem;
    margin:0.2rem;
    font-family: 'Bebas Neue', sans-serif;
    color: #ffffff;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Suavitat en els efectes */
    padding-left: 0.8rem;
    padding-right: 0.8rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    box-sizing: border-box;
}


.botoflex img {
    margin: 0.5rem; /* Aplica un marge al voltant de les imatges */
    max-height: 100%; /* Assegura que les imatges no excedeixin l’alçada del contenidor */
    object-fit: contain; /* Ajusta les imatges per mantenir la proporció dins del contenidor */
    cursor: pointer;
}

.bototopbar {
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 8rem;
    max-width: 8rem;
    max-height: 2.5rem;
    min-height: 2.5rem;
    margin:0.2rem;
    font-family: 'Bebas Neue', sans-serif;
    color: #ffffff;
    text-align: center;
    text-decoration: none !important;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Suavitat en els efectes */
    padding-left: 0.8rem;
    padding-right: 0.8rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    box-sizing: border-box;
}

.bototopbar a {
    font-family: 'Bebas Neue', sans-serif;
    color: #ffffff;
    text-align: center;
    text-decoration: none !important;
}

.bototopbar-img {
    display: flex;
    justify-content: space-between; /* Distribueix l'espai entre el text i la imatge */
    align-items: center; /* Centra verticalment */
    min-width: 8rem;
    max-width: 8rem;
    max-height: 2.5rem;
    min-height: 2.5rem;
    margin: 0.2rem;
    font-family: 'Bebas Neue', sans-serif;
    color: #ffffff;
    text-align: center;
    text-decoration: none !important;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Suavitat en els efectes */
    padding-left: 0.8rem;
    padding-right: 0.8rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    box-sizing: border-box;
    margin-top: 0.2rem;
    margin-right: 0;
}

.bototopbar-img img {

    max-width: 1rem; /* Espai entre la imatge i el text */
}

.bototopbar-icona {
    margin-top: 0.2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 2.5rem;
    max-width: 2.5rem;
    max-height: 2.5rem;
    min-height: 2.5rem;
    font-family: 'Bebas Neue', sans-serif;
    color: #ffffff;
    text-align: center;
    text-decoration: none !important;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Suavitat en els efectes */
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    box-sizing: border-box;
}

.bototopbar-icona img {
    max-width: 1rem;
    display: flex;
}

.bototopbar-iconacontainer {
    gap: 0;
     display: flex;
     flex-direction: row;
}

.bototopbar-img a {
    font-family: 'Bebas Neue', sans-serif;
    color: #ffffff;
    text-align: center;
    text-decoration: none !important;
    display: flex;
    align-items: center; /* Centra verticalment el text */
}




.botomsg {
    display: flex; /* Activa Flexbox */
    align-items: center; /* Centra verticalment el contingut */
    justify-content: center; /* Centra horitzontalment el contingut */
    width: 15rem;
    margin: 0.2rem;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
    color: #ffffff;
    text-align: center;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Suavitat en els efectes */
    box-sizing: border-box;
    padding: 1rem;
}



.noticeh {
    display: flex; /* Activa el model Flexbox per alinear el contingut */
    align-items: center; /* Centra verticalment el contingut */
    justify-content: left; /* Opcional: centra horitzontalment */
    flex: 1;
    height: 2.5rem;
    line-height: 0.7rem;
    margin: 0.1rem;
    cursor: default;
    padding: 0.2rem;
    box-sizing: border-box;
    overflow: hidden;
}

.noticeh img {
    margin: 0.5rem; /* Aplica un marge al voltant de les imatges */
    max-height: 100%; /* Assegura que les imatges no excedeixin l’alçada del contenidor */
    object-fit: contain; /* Ajusta les imatges per mantenir la proporció dins del contenidor */
    cursor: default;
}

.taulahead {
    display: flex; /* Activa el model Flexbox per alinear el contingut */
    align-items: center; /* Centra verticalment el contingut */
    justify-content: center; /* Opcional: centra horitzontalment */
    flex: 1;
    height: 2.8rem;
    line-height: 0.9rem;
    margin: 0.1rem;
    cursor: default;
    padding: 0.2rem;
    box-sizing: border-box;
    overflow: hidden;
}

.iconah {
    width: 2.5rem; /* Ocupa tot l'espai disponible */
    height: 2.5rem;
    margin:0.1rem;
}

.iconah img {
    margin: 0.5rem; /* Aplica un marge al voltant de les imatges */
    max-height: 100%; /* Assegura que les imatges no excedeixin l’alçada del contenidor */
    object-fit: contain; /* Ajusta les imatges per mantenir la proporció dins del contenidor */
    cursor: default;
}

.datesh {
    display: flex; /* Activa Flexbox */
    align-items: center; /* Centra verticalment */
    justify-content: center; /* Centra horitzontalment */
    width: 100%; /* Ocupa tota l'amplada del contenidor */
    min-height: 2.5rem;
    margin: 0.1rem; /* Espai superior */
    line-height: 0.7rem; /* Alçada de línia */
    text-align: center; /* Text centrat horitzontalment */
    overflow: hidden; /* Oculta el text que desborda */
    min-width: 0; /* Solució clau per a Flexbox */
    padding: 0.2rem;
    box-sizing: border-box;
}

/* Alineació vertical */
.contenidor.vertical {
    flex-direction: column; /* Disposa els elements en columna */
}

.augmenta-hover {
    transition: transform 0.3s ease; /* Animació suau */
}

.augmenta-hover:hover {
    transform: scale(1.1); /* Augmenta la mida un 10% */
    cursor: pointer;
}

.divcentre {
    align-items: center;
    justify-content: center;
}

.divdreta {
    align-items: center;
    justify-content: right;
}

.divesquerra {
    align-items: center;
    justify-content: left;
    display: grid;
}

.margesuperior {
    margin-top: 3rem;
}

.taula30 {
    width: 30% !important;
}


.taula50 {
    width: 50% !important;
}

.taula60 {
    width: 60% !important;
}

.taula75 {
    width: 75% !important;
}

@media (max-width: 900px) {
  .taula30,
  .taula50,
  .taula60,
  .taula75 {
    width: 100% !important;
    max-width: 100% !important;
    /* si són fills d’un flex/grid, això ajuda: */
    flex: 0 0 100% !important;
  }
}


.taulavertical td{
    padding:1rem;
}

.assistencies th {
    font-family: "Roboto Condensed", sans-serif;
}


/* Estil general per als controls */
.form-control {
    font-family: "Roboto Condensed", sans-serif;
    font-weight: 400;
    width: 100%; /* Els controls ocupen tot l'espai del contenidor */
    padding: 0.5rem; /* Espaiat intern */
    font-size: 1rem; /* Mida de font estàndard */
    border: 0px solid #ccc; /* Vora subtil */
    box-sizing: border-box; /* Per ajustar l'espaiat intern correctament */
    transition: border-color 0.3s ease; /* Suavitat en canvis de vora */
}

/* Estil quan el control està enfocat */
.form-control:focus {
    border-color: #8ec3c3; /* Canvi de color en enfocar */
    outline: none; /* Elimina el contorn per defecte */
    box-shadow: 0 0 4px rgba(142, 195, 195, 0.5); /* Ombra subtil */
}

/* Estil per al camp deshabilitat */
.form-control[disabled] {
    background-color: #f8f9fa; /* Fons clar */
    color: #212529; /* Text visible */
    border: none; /* Sense vora */
    pointer-events: none; /* Evita interacció */
    appearance: none; /* Treu la fletxa del select */
    text-align: left; /* Text alineat a l'esquerra */
    width: 100%; /* Amplada completa */
}

/* Controls de tipus hora */
.form-control.time-control {
    text-align: center; /* Centrar el text */
    width: auto; /* Ajust automàtic a l'espai */
    max-width: 3rem; /* Amplada màxima */
}

/* Específic per a camps dins de taules */
.table-control {
    margin: 0; /* Elimina marges */
    width: 100%; /* Amplada total */
    height: 100%; /* Alçada total */
}

.message {
    position: fixed; /* Ocupa tota la pantalla */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #e55381;
    color: white;
    font-size: clamp(2rem, 3vw, 3rem);
    line-height: 1.15;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 9999999; /* Assegura que es mostri per sobre de tot */
    cursor: pointer; /* Indica que es pot fer clic */
}

/* Text del missatge */
.message > div:first-child {
    max-width: 75%;
    margin: 0 auto;
}

.message-box {
    width: 90%;
    max-width: 520px;   /* opcional: límit en pantalles molt grans */
}

.message-box > div[id$="-text"] {
  white-space: pre-line;
}

.message-box input{
  width: 50%;
  font-size: clamp(2rem, 3vw, 3rem);
  padding: .5rem .5rem;
  background: #ffffff;
  color: #1f3a1f;
  outline: none;
  box-sizing: border-box;
  margin-top: 3rem;
}

/* Tauleta vertical */
@media (orientation: portrait) and (max-width: 900px) {
    .message-box {
        width: 90%;
        max-width: 520px;   /* opcional: límit en pantalles molt grans */
        margin-bottom: 12rem

    }
    .message > div:first-child {
        padding-bottom: 14rem;
    }
}

/* Mòbil */
@media (max-width: 768px) {
    .message > div:first-child {
        max-width: 95%;
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

.noborder {
    border: 0 !important;
}

faieldset.group  { 
  margin: 0; 
  padding: 0; 
  margin-bottom: 1.25em; 
  padding: .125em; 
} 

faieldset.group legend { 
  margin: 0; 
  padding: 0; 
  font-weight: bold; 
  margin-left: 20px; 
  font-size: 100%; 
  color: black; 
} 

.checkbox-group-pestanya {
    display: flex;
    flex-direction: row; /* Posa cada checkbox en una línia nova */
    gap: 6px; /* Espai entre les opcions */
    width: unset !important;
}

.checkbox-group-pestanya label {
    display: flex;
    align-items: center;
    gap: 8px; /* Espai entre el checkbox i el text */
    cursor: pointer; /* Canvia el cursor per indicar que es pot clicar */
    padding: 0.5rem;
}

.checkbox-group-pestanya input[type="checkbox"] {
    margin: 0; /* Elimina marges innecessaris */
    width: unset;
}

ul.checkbox  { 
  margin: 0; 
  padding: 0; 
  margin-left: 20px; 
  list-style: none; 
} 

ul.checkbox li input { 
  margin-right: .25em; 
} 

ul.checkbox li { 
  border: 1px transparent solid; 
  display:inline-block;
  width:20em;
} 

ul.checkbox li label { 
  display: inline-block ; 
} 


.modalform {
    position: fixed; /* Ocupa tota la pantalla */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: white;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 1000; /* Assegura que es mostri per sobre de tot */
    cursor: pointer; /* Indica que es pot fer clic */
}

.permanentmsg {
    position: fixed; /* Ocupa tota la pantalla */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #e55381;
    color: white;
    font-size: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 1000; /* Assegura que es mostri per sobre de tot */
    cursor: pointer; /* Indica que es pot fer clic */
}

.verify {
    position: fixed; /* Ocupa tota la pantalla */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: white;
    font-size: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 1000; /* Assegura que es mostri per sobre de tot */
    cursor: pointer; /* Indica que es pot fer clic */
}


.error-container {
    background-color: #e55381 !important;
}

.alert {
background-color: #feb20e !important;
}

.success {
background-color: #aed581 !important;
}

.hidden {
    display: none;
}

.info {
background-color: grey !important;
}

.input-group {
    display: flex;
    align-items: center;
    width: 100%;
}

.input-group-text {
    padding: 0.4rem;
    background-color: white;
    font-size: 1rem;
}

.radio-apte {
    opacity: 1 !important;
    position: unset !important;
}

.radio-noapte {
    opacity: 1 !important;
    position: unset !important;
}

/* Base per a radio-enmarcat */
.radio-enmarcat {
    display: flex;
    gap: 10px;
}

.radio-enmarcat input[type="radio"] {
    position: absolute; /* Oculta els inputs sense afectar el layout */
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.radio-enmarcat label {
    min-width: 7rem;
    padding: 0.5rem 0.7rem;
    cursor: pointer;
    transition: all 0.3s ease; /* Transició suau */
    text-align: center;
}

.radio-enmarcat label:hover {
    background-color: #eaeaea; /* Canvia el color quan es fa hover */
}

.radio-enmarcat input[type="radio"] + label {
    background-color: white; /* Color de fons quan no està seleccionat */
    color: grey;
    font-weight: normal; /* Text normal */
}

/* Colors per a l'estat "checked" */
.radio-enmarcat.rosa input[type="radio"]:checked + label {
    background-color: #e55381;
    color: white;
    font-weight: bold;
}

.radio-enmarcat.blaucel input[type="radio"]:checked + label {
    background-color: #8ec3c3;
    color: white;
    font-weight: bold;
}

.radio-enmarcat.lila input[type="radio"]:checked + label {
    background-color: #b2abbe;
    color: white;
    font-weight: bold;
}

.radio-enmarcat.taronja input[type="radio"]:checked + label {
    background-color: #feb20e;
    color: white;
    font-weight: bold;
}

.radio-enmarcat.blaumari input[type="radio"]:checked + label {
    background-color: #708090;
    color: white;
    font-weight: bold;
}

.radio-enmarcat.verd input[type="radio"]:checked + label {
    background-color: #aed581;
    color: white;
    font-weight: bold;
}

.radio-enmarcat.gris input[type="radio"]:checked + label {
    background-color: #bfbfbf;
    color: white;
    font-weight: bold;
}

.radio-enmarcat.ocre input[type="radio"]:checked + label {
    background-color: #d8baa9;
    color: white;
    font-weight: bold;
}

.radio-enmarcat.grisclar input[type="radio"]:checked + label {
    background-color: #cfcfcf;
    color: white;
    font-weight: bold;
}

.radio-enmarcat.blanc input[type="radio"]:checked + label {
    background-color: #ffffff;
    color: black;
    font-weight: bold;
}

.radio-enmarcat.negre input[type="radio"]:checked + label {
    background-color: #0e1111;
    color: white;
    font-weight: bold;
    overflow: visible !important;
    position: relative;
    z-index: 10;
}


/* Personalització de les etiquetes */
.form-label {
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 0.2rem;
    margin-top: 1.2rem;
    display: block;
}

/* Personalització dels camps */
.form-field {
    font-family: "Roboto Condensed", sans-serif;
    padding: 0.7rem;
    font-size: 1.2em;
    width: 100%;
    box-sizing: border-box;
    background-color: lightgrey;
}

/* Afegir focus per als camps */
.form-field:focus {
    border: 4px solid black;
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 5px rgba(128, 189, 255, 0.5);
}
.filter-input {
    width: 100%; /* Ocupa el 100% de l'amplada del td */
    box-sizing: border-box; /* Inclou el padding i el border dins de l'amplada */
    padding: 0.4rem; /* Espai intern */
    font-size: 1rem; /* Mida de la lletra */
    border: 1px solid #ccc; /* Vora fina i gris */
    border-radius: 4px; /* Arrodonim les cantonades */
    outline: none; /* Elimina l'outline quan està enfocat */
    transition: border-color 0.3s ease; /* Suavitat en el canvi de color de la vora */
    margin-bottom: 5px;
}

.filter-input:focus {
    border-color: #8ec3c3; /* Color blau clar quan es fa focus */
    box-shadow: 0 0 4px rgba(142, 195, 195, 0.5); /* Ombra subtil */
}


/* Assegura que els camps tenen un estil inicial consistent */
input,
textarea {
    width: 100%;
    font-family: "Roboto Condensed", sans-serif;
    font-size: 1.2rem;
    color: #000;
    border: 1px solid #ced4da;
}

.tres-columnes {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 4 columnes iguals */
    gap: 1rem; /* Espai entre elements */
}

.noextenguisverticalment {
    align-self: start;
}


.visorhtml textarea {
    width: 100%;
    min-height: 30vh; /* Ajusta l'alçada mínima si cal */
    box-sizing: border-box; /* Per evitar desbordaments causats pels marges o padding */
    resize: vertical; /* Permet canviar la mida només verticalment */
}

.contenidor-html {
    display: block; /* Assegura que es comporta com un contenidor de bloc */
    overflow: visible; /* Evita truncar el contingut */
}

.pestanya-html {
    display: flex; /* Si cal, utilitza 'block' si no és necessari flexbox */
    flex-direction: column; /* Assegura que els elements es col·loquin en columna */
    height: 55vh; /* Permet que el contenidor creixi automàticament */
    overflow: visible; /* Evita truncar el contingut que sobrepassa */
    padding: 1.5rem;
    border: 0.3rem solid;
    line-height: 1.4;
    background-color: white;
    border-radius: 0;
    margin-top: 0;
    text-align: left;
    border-color: #aed581;
}


.vista-html {
    diplay: inline-block;
    transform: scale(1.7); /* Escala al 170% */
    transform-origin: top left; /* Escala des de la cantonada superior esquerra */
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    padding: 10px;
    width: 48vw; /* Ajustar l'ample al contenidor */
    max-width: 48vw; /* Evitar que es desbordi horitzontalment */
    height: 30vh; /* Alçada del 50% de la finestra del navegador */
    max-height: 30vh; /* Limitar al 50% de l'alçada */
    overflow-y: scroll; /* Activa desplaçament vertical */
    overflow-x: scroll; /* Evita desplaçament horitzontal */
    white-space: normal;
    line-height: 1.5;
    box-sizing: border-box; /* Incloure padding i border a l'ample */
}





/* Estil per a la taula del paginador */
.taula.paginador {
    width: 100%;
    border-collapse: collapse; /* Elimina espais entre cel·les */
    margin-bottom: 0 !important;
}

/* Ajusta les columnes específiques */
.taula.paginador th,
.taula.paginador td {
    text-align: center; /* Centra el contingut */
    padding: 0.5rem; /* Espai intern per a cel·les */
    border: 1px solid #ffffff; /* Vora blanca */
}

.taula.paginador td:first-child,
.taula.paginador td:nth-child(2),
.taula.paginador td:nth-child(4),
.taula.paginador td:nth-child(5) {
    width: 5%; /* Amplada fixa per a aquestes columnes */
    white-space: nowrap; /* Evita trencaments de text */
}

.taula.paginador td:nth-child(3) {
    width: auto; /* Aquesta columna ocupa l'espai restant */
}

/* Estil pels elements li dins del paginador */
.taula.paginador td li {
    list-style-type: none; /* Elimina els punts de la llista */
    display: inline-block; /* Mostra els elements en línia */
    margin: 0.2rem; /* Separació entre elements */
    padding: 0.8rem 1.2rem; /* Espai intern */
    background-color: #708090; /* Fons blau mari */
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 1rem; /* Ajusta la mida del text */
    transition: transform 0.3s ease, background-color 0.3s ease; /* Suavitat en hover */
    text-decoration: none;
    color: black;
}

.taula.paginador a {
    text-decoration: none;
    color: white;
}
/* Estil per a la pàgina activa */
.taula.paginador td li.active {
    background-color: #8ec3c3; /* Verd clar per a la pàgina activa */
    transform: scale(1.1); /* Lleuger augment */
    color: white;
}

/* Hover pels elements */
.taula.paginador td li:hover {
    background-color: #8ec3c3; /* Blau cel en passar el ratolí */
    transform: scale(1.1); /* Augmenta lleugerament la mida */
}

.marge-inferior {
    margin-bottom: 1em;
}

.ocultar-text {
    -webkit-text-security: disc; /* Oculta el text com una contrasenya */
    text-security: disc; /* Compatibilitat amb altres navegadors */
    font-size: 20px; /* Opcional: augmenta la mida del text */
    letter-spacing: 5px; /* Augmenta l'espai per dificultar la lectura */
}

/* Contenidor general de la llista */
.llistaopcions-checkbox {
    column-count: 4;      /* quantes columnes vols */
    column-gap: 0.5rem;   /* espai entre columnes */
}

/* Cada opció ocupa una línia dins la columna */
.llistaopcions-checkbox .llistaopcions-item{
  display: block;        /* columna-multicol pel bloc de checkboxes */
  break-inside: avoid;
}

/* 1 columna */
.llistaopcions-checkbox.cols-1 {
    column-count: 1;
}

/* 2 columnes */
.llistaopcions-checkbox.cols-2 {
    column-count: 2;
}

/* 3 columnes */
.llistaopcions-checkbox.cols-3 {
    column-count: 3;
}

/* Checkbox quadrat — el que ja tenies, adaptat si cal */
.llistaopcions-checkbox input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 1.2rem;
    height: 1.2rem;
    border: 0.25rem solid currentColor;
    border-radius: 0;
    background-color: #fff;
    cursor: pointer;
    margin-right: 0.3rem;
    vertical-align: middle;
}

/* Quan està marcat */
.llistaopcions-checkbox input[type="checkbox"]:checked {
    background-color: currentColor;
}

.llistaopcions-item{
  display:flex;
  align-items:flex-start;
  gap: .9rem;
  cursor:pointer;
}

/* Text de l’opció */
.llistaopcions-checkbox .llistaopcions-item span {
    line-height: 1rem;   /* controles com de juntes van */
}

.llistaopcions-checkbox.verd input[type="checkbox"] {
    color: #aed581;  /* currentColor = verd aquí */
}

.llistaopcions-checkbox.rosa input[type="checkbox"] {
    color: #e55381 !important;
}

.llistaopcions-checkbox.blaucel input[type="checkbox"] {
    color: #8ec3c3 !important;
}

.llistaopcions-checkbox.lila input[type="checkbox"] {
    color: #b2abbe !important;
}

.llistaopcions-checkbox.taronja input[type="checkbox"] {
    color: #feb20e !important;
}

.llistaopcions-checkbox.blaumari input[type="checkbox"] {
    color: #708090 !important;
}

.llistaopcions-checkbox.verd input[type="checkbox"] {
    color: #aed581 !important;
}

.llistaopcions-checkbox.gris input[type="checkbox"] {
    color: #bfbfbf !important;
}

.llistaopcions-checkbox.ocre input[type="checkbox"] {
    color: #d8baa9 !important;
}

.llistaopcions-checkbox.grisclar input[type="checkbox"] {
    color: #cfcfcf !important;
}

.llistaopcions-checkbox.blanc input[type="checkbox"] {
    color: #ffffff !important;
}

.llistaopcions-checkbox.negre input[type="checkbox"] {
    color: #0e1111 !important;
}

@media (max-width: 600px) {
    .llistaopcions-checkbox {
        column-count: 1 !important;
    }
}


.menu-container {
    position: absolute; /* Col·loca el div fora del flux del document, per sobre dels altres elements */
    top: 0; /* Posa-ho a la part superior de la pàgina o contenidor pare */
    left: 20rem; /* Centra horitzontalment respecte al pare */
    transform: translateX(-50%); /* Desplaça per centrar-lo exactament */
    width: 15rem; /* Estableix un width màxim de 15rem */
    height: auto; /* Deixa que l'altura sigui indefinida (es redimensionarà segons el contingut) */
    z-index: 9999; /* Col·loca el div per sobre de tots els altres elements (podeu ajustar aquest valor) */
    pointer-events: none; /* Opcional: desactiva la interacció amb el div (si no voleu que s'interactuï) */
    background-color: white;
    margin-top: 3.75rem;
    border: 0.3rem solid;
    border-color: black;
    display: flex;
    justify-content: center;
    flex-direction: column;
}

.botomenu {
    display: flex;
    justify-content: center;
    align-items: center;
    width: auto;
    max-height: 2.5rem;
    min-height: 2.5rem;
    margin:0.2rem;
    font-family: 'Bebas Neue', sans-serif;
    color: #ffffff;
    text-align: center;
    text-decoration: none !important;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Suavitat en els efectes */
    padding-left: 0.8rem;
    padding-right: 0.8rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    box-sizing: border-box;
}

.botomenu a {
    font-family: 'Bebas Neue', sans-serif;
    color: #ffffff;
    text-align: center;
    text-decoration: none !important;
}
.ui-autocomplete {
    z-index: 2000 !important;
    font-size: 2rem;
}

botomini.posicionador-menu {
    position: relative;
}

.menu {
    display: none; /* Amagar el menú per defecte */
    position: absolute; /* Permet que el menú es mostri fora del seu contenidor */
    top: 100%; /* Situa el menú immediatament sota el botó (o l'element disparador) */
    right: 0; /* Aliniament horitzontal al principi de l'element pare */
    background-color: white; /* Fons blanc per al menú */
    border: 4px solid #d8baa9; /* Bordes suaus al menú */
    padding: 0.1rem; /* Mida de les opcions */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Afegir una ombra per una millor visibilitat */
    width: 15rem;
    z-index: 99;
    text-transform: uppercase;
}


.menu.gris {
    border: 4px solid #bfbfbf !important; /* Bordes suaus al menú */
}

/* Opció per quan el menú està visible */
.menu.show {
    display: block; /* Mostrar el menú quan la classe 'show' es l'element actiu */
    z-index: 10000000 !important;
}

.message.show {
    display: flex; /* Mostrar el menú quan la classe 'show' es l'element actiu */
    z-index: 10000000 !important;
}

/* Estils per a la llista d'enllaços */
.menu ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    font-size: 0.8rem;
}

.menu ul li {
    padding: 5px 5px;
}

.menu ul li a {
    text-decoration: none;
    color: #333;
}


.menu ul li:hover {
    color: #007bff;
    background-color: #9999;
}

.fila-districte.ocult {
    display: none;
}

.fila-districte.visible {
    display: table-row;
}



.divalta {
    display: flex;
    position: fixed; 
    top: 0; 
    left: 0; 
    height: 100vh;
    width: 97%;
    background: white; 
    z-index: 1000; 
    overflow: auto; 
    margin-top: -0.3em; 
    padding-right: 2rem; 
    padding-left: 2em; 
    padding-top: 4em; 
    padding-bottom: 4em;
}

td.accions {
    position: relative;
}

.nowidth {
    width: unset !important;
}

.marginleft {
    margin-left: 2rem;
}
.marginright {
    margin-right: 2rem;
}

.camp-operacio {
    margin-top: 1.2rem;       /* Distància extra respecte el div anterior */
    max-width: 14vh;         /* Més estret */
    margin-left: auto;
    margin-right: auto;       /* Centrat dins la td */
    text-align: center;
}

.camp-operacio input {
    width: 100%;              /* El camp ocupa tot el div */
    padding: 0.4rem;
}

.input-modal {
    padding: 5px 10px;
    font-size: 2rem;
}

.botomsg.desactivat {
    pointer-events: none;
    opacity: 0.5;
}

.nav-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-left: 0;
    border-bottom: none;
    margin-bottom: 1rem;
}

.nav-tabs li {
    display: inline-block;
    margin: 0;
}

.nav-tabs .nav-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #f1f1f1;
    border: none;
    color: black;
    text-decoration: none;
    cursor: pointer;
    font-weight: bold;
    border-top-left-radius: 0.25rem;
    border-top-right-radius: 0.25rem;
}

.nav-tabs .nav-link.active {
    background-color: white;
    border-bottom: none;
}
.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}




/* Grup de botons toggle */
.toggle-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Oculta el radio original */

.toggle-radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

/* Estil bàsic del botó associat al radio */
.toggle-label {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #e0e0e0; /* gris clar quan no seleccionat */
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 12rem;
    text-align: center;
}

/* Estat seleccionat per defecte */
.toggle-radio:checked + .toggle-label {
    color: white;
    font-weight: bold;
    background-color: #999;
}

/* Colors personalitzats per valor (no seleccionats) */
.toggle-label.valor-1 { background-color: #ccc; }     /* rosa suau */
.toggle-label.valor-2 { background-color: #ccc; }     /* taronja suau */
.toggle-label.valor-3 { background-color: #ccc; }     /* verd clar */
.toggle-label.valor-4 { background-color: #ccc; }     /* verd intens */
.toggle-label.valor-nsnc { background-color: #ccc; }     /* gris */

/* Colors seleccionats per valor */
.toggle-radio:checked + .valor-1 { background-color: #e55381; }
.toggle-radio:checked + .valor-2 { background-color: #feb20e; }
.toggle-radio:checked + .valor-3 { background-color: #8bc34a; }
.toggle-radio:checked + .valor-4 { background-color: #388e3c; }
.toggle-radio:checked + .valor-nsnc { background-color: #999; }

/* Estil de la pregunta */
.preguntatext {
    font-family: 'Roboto Condensed', sans-serif;
    font-weight: bold;
    font-size: 24px;
    margin-bottom: 2rem;
}

/* Contenidor de cada pregunta */
.pregunta {
    border: 4px solid #708090;
    padding: 2rem;
    margin-bottom: 3rem;
    width: 75%;
    margin-left: auto;
    margin-right: auto;
    background-color: #fdfdfd;
}

.form-control.enquesta {
    border: solid 4px grey;
}

.pantalla-completa {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: white;
    z-index: 998;
    overflow-y: auto;
    padding: 2rem;
}

.marge-inferior-extra {
    margin-bottom: 6rem;
}

.divnou {
    height: 90%;
}

.lang-select{
    justify-content: flex-end;
}
/* --- Taula de CERCA en mòbil --- */
/* CERCA: capçaleres en files, sense text, input a 100% */
@media (max-width: 900px) {
  table.taula.taula-filar thead.cerca { display: block; }
  table.taula.taula-filar thead.cerca tr { display: block; }
  table.taula.taula-filar thead.cerca th {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: .5rem .75rem;
    border-left: 0;
    border-right: 0;
    font-size: 0;          /* amaga el text del TH */
    line-height: 0;
  }
  table.taula.taula-filar thead.cerca th .filter-input {
    font-size: 0.875rem !important;        /* lletra petita (~14px) */
    text-align: left !important;
    display: block;
    width: 100% !important; /* omple de punta a punta encara que .petit defineixi amplada */
    box-sizing: border-box;
    font-size: 16px;        /* restaura mida del text a l’input */
    line-height: 1.2;
    margin: 0;
  }
  /* opcional: amagar el TH “Accions” del thead en mòbil */
  table.taula.taula-filar thead.cerca th[rowspan] { display: none; }

  .lang-select{
    justify-content:left;
    margin-bottom: 0.5rem;
    margin-top: 0.5rem;
}

.divalta {
    display: flex;
    position: fixed; 
    top: 0; 
    left: 0; 
    height: 100vh;
    width: 97%;
    background: white; 
    z-index: 1000; 
    overflow: auto; 
    margin-top: -0.3em; 
    padding-right: 1rem; 
    padding-left: 1rem; 
    padding-top: 1rem; 
    padding-bottom: unset;
}

}

@media (max-width: 900px) {
  #paginator-top .contenidor,
  #paginator-bottom .contenidor {
    display: flex;
    align-items: center;      /* alinea verticalment botons i text */
    justify-content: center;  /* tot centrat */
    gap: .5rem;
  }

  /* Botons fixes (no s'estiren) */
  #paginator-top .contenidor button,
  #paginator-bottom .contenidor button {
    flex: 0 0 auto;
  }

  /* L'span pot ocupar espai i fer salt de línia */
  #paginator-top .contenidor span,
  #paginator-bottom .contenidor span {
    flex: 1 1 auto;           /* guanya espai entre botons */
    max-width: 30vw;          /* limita ample perquè pugui trencar en 2 línies */
    text-align: center;       
    white-space: normal;      /* permet salts de línia */
    word-wrap: break-word;    
    line-height: 1.2;
    font-size: 0.8rem;
  }
}

@media (max-width: 900px) {
  table.taula.taula-filar [class*="columna"] {
    width: 100% !important;   /* ignora columna5, columna8, etc. */
    max-width: 100% !important;
    flex: none !important;     /* per si usen flex-basis */
    display: block;            /* cada TH en la seva "fila" */
  }
}


@media (max-width: 768px) {
  table.taula-filar, table.taulavertical {
    display: block;
    width: 100%;
  }
table.taula-filar thead,
table.taulavertical thead {
  border: none !important;
}

table.taula-filar th,
table.taulavertical th {
  border: none !important;
}

  table.taula-filar tbody,
  table.taulavertical tbody {
    display: block;
  }

  table.taula-filar tr,
  table.taulavertical tr {
    display: block;
     border-top: solid 1rem white;
     border-bottom: solid 1rem white;
  }


  table.taula-filar td,
  table.taulavertical td {
    display: block;
    width: 100%;
    padding: 0.25rem 0;
    text-align: left;
    border: none;
  }

  table.taula-filar td:before,
  table.taulavertical td:before {
    content: attr(data-label);
    font-weight: bold;
    display: block;
    margin-bottom: 0.25rem;
     border: none;
  }

.divalta {
    width: unset;
}


    .divcols {
        flex-direction: column !important;
      }

  .divcols .col {
    width: 100% !important;
    max-width: 100% !important;
  }

  .divcols.primeraestreta > .col:first-child,
  .divcols.primeraestreta > .col:not(:first-child),
  .divcols.primeramitjana > .col:first-child,
  .divcols.primeramitjana > .col:not(:first-child) {
    flex: 1 1 100% !important;
    max-width: 100% !important;
  }

  .menu-opcions-principal .botomenuppal-wrapper:first-child {
    margin-top: 4rem;
  }
  .radio-enmarcat label {
    min-width: 10vh !important;
    }

.fila-districte.visible {
    display: block;
}


}

/* Amagats per defecte */
.sidebar-close, .sidebar-backdrop { display: none; }

/* Mòbil */
@media (max-width: 900px) {
  /* Botó tancar, visible quan hi ha una sidebar oberta */
  body[data-sidebar-open="true"] .sidebar-close {
    display: inline-flex;
  }
  .sidebar-close {
    position: fixed;
    top: .75rem; right: .75rem;
    z-index: 3001;              /* per sobre de .sidebar */
    width: 2.75rem; height: 2.75rem;
    background: #fff; color: #000;
    font-size: 1.25rem; line-height: 1;
    align-items: center; justify-content: center;
    cursor: pointer;
    border: none;
  }

  /* Backdrop fosc, visible només amb sidebar oberta */
  body[data-sidebar-open="true"] .sidebar-backdrop {
    display: block;
  }
}
.users {max-width: 50rem}

@media (max-width: 900px) {
  /* Amaga la 2a fila del THEAD (capçaleres de columnes) */
  .taula.taula-filar thead tr:nth-child(2) { display: none !important;}

  /* Files del TBODY en mode bloc */
  .taula.taula-filar tbody tr { display: block; margin: .75rem 0; border: 0; }
  .taula.taula-filar tbody td { 
    display: block; 
    border: 0; 
    padding: .5rem .75rem; 
    box-sizing: border-box;
  }

  /* El “títol” de la columna (injectat via JS) */
  .taula.taula-filar tbody td .mob-label {
    display: block;
    font-weight: 600;
    font-size: .9rem;
    opacity: .85;
    margin-bottom: .15rem;
    /* si vols tot en majúscules: text-transform: uppercase; */
  }

  /* La primera fila del THEAD (ALTES) la deixem visible tal com està */
}
@media (max-width: 900px) {
  td.accions .contenidor.divcentre {
    display: flex;           /* assegura flex */
    flex-wrap: wrap;         /* permet que saltin a noves línies */
    justify-content: flex-start; /* alineats a l'esquerra */
    align-items: center;
    gap: .5rem;              /* ESPAI entre botons i ENTRE FILES 👈 */
  }

  td.esquerra .contenidor.divcentre {
    display: flex;           /* assegura flex */
    flex-wrap: wrap;         /* permet que saltin a noves línies */
    justify-content: flex-start; /* alineats a l'esquerra */
    align-items: center;
    gap: .5rem;              /* ESPAI entre botons i ENTRE FILES 👈 */
  }

  /* Neteja marges interns si .botomini en porta (evita "enganxaments") */
  td.accions .contenidor.divcentre > .botomini {
    margin: 0;
  }
}

/* Fallback per navegadors sense suport de gap en flex (antics) */
@supports not (gap: 1rem) {
  @media (max-width: 900px) {
    td.accions .contenidor.divcentre { 
      margin: -.25rem 0 0 -.25rem;
    }
    td.accions .contenidor.divcentre > .botomini {
      margin: .25rem 0 0 .25rem;  /* imita el gap, també entre files */
    }
  }
}

/* (Opcional) Fonts, si no les tens ja al teu CSS general */
@import url('https://fonts.googleapis.com/css2?family=Roboto+Condensed:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue:wght@400;700&display=swap');

.custom-button{
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:stretch;
  text-align:center;
  text-decoration:none;
  border:0;
  border-radius:0;
  box-shadow:none;
  max-width: 20rem;

  /* IMPORTANT per evitar el “fil rosa” */
  overflow: hidden;

  /* Renderitzat més net durant transforms */
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-font-smoothing: antialiased;

  /* Hover */
  transition: transform .2s ease, box-shadow .2s ease;
}

/* spans ben “encaixats” */
.custom-button .line1,
.custom-button .line2{
  display:flex;                /* clau */
  align-items:center;          /* centra verticalment */
  justify-content:center;      /* centra horitzontalment */
  margin:0;
  border:0;
}


.custom-button .line1{
  padding:1rem;
  font-family:'Bebas Neue', sans-serif;
  font-size:1.8rem;
  line-height:1;
  color:#fff;
}

.custom-button .line2{
  padding:0.7rem;
  font-family:'Roboto Condensed', sans-serif;
  font-size: 1.2rem;
  background:#f5f5f5;
  color:#191919;
  height:3rem;
}


/* Hover: ombra + creixement */
.custom-button:hover,
.custom-button:focus-visible{
  transform: translateZ(0) scale(1.06);
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
  outline: none;
}

/* COLORS (només afecta line1) */
.botorosa .line1{ background:#e55381; }
.botoblaucel .line1{ background:#8ec3c3; }
.botolila .line1{ background:#b2abbe; }
.bototaronja .line1{ background:#feb20e; }
.botoblaumari .line1{ background:#708090; }
.botoverd .line1{ background:#aed581; }
.botogris .line1{ background:#bfbfbf; }
.botoocre .line1{ background:#d8baa9; }
.botogrisclar .line1{ background:#cfcfcf; }

@media (max-width: 600px) {

  .custom-button {
    margin: 0.2rem;     /* menys aire general */
    max-width: 100%;
  }

  .custom-button .line1 {
    padding: 0.5rem;   /* abans 1rem */
    font-size: 1.4rem; /* abans 2rem */
    line-height: 1;
  }

  .custom-button .line2 {
    padding: 0.4rem;   /* abans 20px */
    height: 2rem;      /* abans 3rem */
    font-size: 0.85rem;
    line-height: 1.1;
  }
}


@media (prefers-reduced-motion: reduce) {
  .custom-button { animation: none; }
}
.sidebar-item {
    margin-top: 0.3rem;
    margin-bottom: 0.3rem;
}

.pagina-body table {
    width: 100%;
    border-collapse: collapse;
}

.pagina-body table td,
.pagina-body table th {
    border: 1px solid #ddd;
    padding: 0.4rem;
}

.pagina-body img {
    max-width: 100%;
    height: auto;
}

