@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: 2rem;
}

h2 {
    font-size: 1.8rem;
}

h3 {
    font-size: 1.6rem;
}

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

.sensedeco {
    text-decoration: none;
}

table {
    margin: 0 auto; /* Centra la taula horitzontalment */
    margin-bottom: 1.5rem;
}

 table.horariaula {
        border: 2px solid white;
        background-color: #f0f0f0;
        border-collapse: collapse;
        font-size: 0.85rem;
        width: 100%;
        text-align: center;
    }

    table.horariaula th {
        background-color: #708090;
        color: white;
        padding: 4px;
        border: 1px solid white;
        position: sticky;
        z-index: 5;
        font-family: "Bebas Neue", sans-serif;
        font-weight: normal;
    }

    table.horariaula a {
        color: white;
        text-decoration: none;
    }

    /* Fila 1 sticky (primera fila del thead) */
    table.horariaula thead tr:first-child th {
        top: 0;
        z-index: 10;
    }

    /* Fila 2 sticky (segona fila del thead) */
    table.horariaula thead tr:nth-child(2) th {
        top: 2rem; /* ajusta segons alçada real de la primera fila */
        z-index: 9;
    }

    table.horariaula td {
        border: 1px solid white;
        padding: 4px;
    }

    table.horariaula tr:nth-child(even) {
        background-color: #f8f8f8;
    }

    table.horariaula tr:nth-child(odd) {
        background-color: #f0f0f0;
    }

    table.horariaula td:first-child {
        background-color: #444;
        color: white;
        font-weight: bold;
        position: sticky;
        left: 0;
        z-index: 4;
    }

    table.horariaula th:first-child {
        position: sticky;
        left: 0;
        z-index: 11;
    }




/* ====== FULLSCREEN ====== */
.wizard-fullscreen{
  position: fixed;
  inset: 0;
  z-index: 9999999;
  display: flex;
  justify-content: center;   /* centra la columna horitzontalment */
  align-items: stretch;      /* ocupa tota alçada */
  background: #d3e8b8;
  color: #1f3a1f;
}

/* ====== COLUMNA PRINCIPAL ====== */
.wizard-shell{
  height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  padding: 1rem;
}

/* En pantalles grans: 50% amplada i centrada */
@media (min-width: 900px){
  .wizard-shell{
    width: 70vw;
    max-width: 900px;
  }
}

/* ====== SECCIONS (20 / 60 / 20) ====== */
.wizard-section{
  width: 100%;
  box-sizing: border-box;
}

.wizard-section-top{
  height: 20vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;   /* alineació vertical a sota */
  gap: 0.75rem;
}

.wizard-section-main{
  height: 60vh;
  display: flex;
  align-items: stretch;        /* ✅ */
  justify-content: flex-start;
  overflow: hidden;            /* ✅ el scroll el farà l'interior */
}

.wizard-main-inner{
  width: 100%;
  height: 100%;                /* ✅ perquè pugui fer scroll */
  overflow-y: auto;            /* ✅ scroll dins el main */
  padding-right: 3rem;       /* ✅ per no tapar text amb scrollbar */
  padding-left: 3rem;
  box-sizing: border-box;
}

.wizard-section-bottom{
  height: 20vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* alineació vertical superior */
}

/* ====== TOPBAR ====== */
.wizard-topbar{
  display: flex;
  justify-content: flex-end;
}

.wizard-lang-select{
  padding: .6rem .8rem;
  border: 4px solid #aed581;
  background: #ffffff;
  color: #1f3a1f;
}

/* ====== AUDIO ====== */
.wizard-help-actions{
  display: flex;
  justify-content: flex-start;
}

.wizard-btn-audio{
  font-size: 1.25rem;
  padding: 0 !important;
  border: 4px solid #aed581;
  background: #d3e8b8;
  color: #1f3a1f;
  cursor: pointer;
  max-width: 1rem !important;
  min-width: 1rem !important;
}

/* ====== TÍTOL ====== */
.wizard-title{
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: .2px;
  color: #1f3a1f;
}

/* ====== HELP ====== */
.wizard-help{
  display: flex;
  gap: .75rem;
  align-items: flex-start;
}

.wizard-help-text{
  font-size: 1.25rem;
  line-height: 1.35;
  white-space: pre-line;
  color: #2e5a2e;
}

/* ====== EXEMPLES ====== */
.wizard-examples{
  font-size: 1.05rem;
  padding: .6rem .8rem;
  border-left: 4px solid #aed581;
  background: #eef6e3;
  color: #2e5a2e;
  margin: 1.5rem 0;
}

/* ====== CAMP ====== */
.wizard-field{
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.wizard-input{
  width: 100%;
  font-size: clamp(2rem, 3vw, 3rem);
  padding: .5rem .5rem;
  background: #ffffff;
  border: 4px solid #aed581;
  color: #1f3a1f;
  outline: none;
  box-sizing: border-box;
}

.wizard-input:focus{
  border-color: #8bc34a;
}

.quadrimestral-order-field{
  flex-direction: row;
  align-items: center;
  gap: 1rem;
}

.wizard-input.quadrimestral-order{
  width: 4rem;
  max-width: 4rem;
  min-width: 4rem;
  flex: 0 0 4rem;
  font-size: 1.5rem;
  padding: .4rem .5rem;
  text-align: center;
}

.quadrimestral-order-label{
  align-self: center;
  margin: 0;
}

.wizard-error{
  font-size: 1rem;
  color: #b71c1c;
}

/* ====== BOTONS (footer) ====== */
.wizard-actions{
  width: 100%;
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-top: 1.5rem;
  justify-content: center;
}

/* mateixa amplada */
.wizard-actions .wizard-btn{
  flex: 1;
  align-items: center;
}

/* botó base */
.wizard-btn{
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.2rem;
  padding: .85rem 1.1rem;
  border: 0;
  cursor: pointer;
  max-width: 12rem;
  min-width: 12rem;
}

/* colors */
.wizard-btn-back{
  background: #e55381;
  color: white;
}

.wizard-btn-next{
  background: #aed581;
  color: white;
}

.wizard-btn-next:disabled{
  background: #e6f2d5;
  color: #6b8f5f;
  cursor: not-allowed;
}

.wizard-phone-row{
  display: flex;
  gap: .75rem;
  align-items: center;
  width: 100%;
}

.wizard-phone-code{
  flex: 0 0 45%;
  min-width: 0;
}

.wizard-phone-number{
  flex: 1 1 auto;
  min-width: 0;
}

/* =========================
   Wizard – radios grans
   ========================= */

.wizard-radio {
  margin-left: 2.2rem;
  display: flex;
  align-items: flex-start;
  flex-direction: row; 
  gap: 0.9rem;
  cursor: pointer;
}

/* Amaguem el radio natiu */
.wizard-radio input[type="radio"]{
  appearance:none;
  width:26px;
  height:26px;
  margin-top: .15rem;
  border-radius:50%;
  border:3px solid #7fc241;
  background:#fff;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  flex-shrink:0;
}

/* FIX: el radio no pot ser absolute; ha de fer scroll amb el contingut */
.wizard-radio input[type="radio"] {
  position: static !important;   /* o relative, però static és el més net */
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
}

.wizard-radio input[type="radio"]::before{
  content:"";
  width:14px;
  height:14px;
  border-radius:50%;
  background:#7fc241;
  transform:scale(0);
  transition:transform .15s ease-in-out;
}
.wizard-radio input[type="radio"]:checked::before{
  transform:scale(1);
}

/* Focus (accessibilitat) */
.wizard-radio input[type="radio"]:focus-visible {
  outline: 3px solid rgba(127, 194, 65, 0.4);
  outline-offset: 2px;
}

/* Text del radio → IGUAL que wizard-help-text */
.wizard-radio span {
  font-size: 1.25rem;     /* 👈 igual que help */
  line-height: 1.35;     /* 👈 igual que help */
  color: #2e5a2e;
  cursor: pointer;
}

.wizard-radio .llistaopcions-label{
  font-size: 1.25rem;
  line-height: 1.35;
  color: #2e5a2e;
}

.wizard-lang-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr));
  gap: 12px 16px;
  justify-items: center;   /* centra els botons horitzontalment */
  align-items: center;
}

.wizard-lang-grid .wizard-btn {
  width: 100%;
  max-width: 240px;        /* evita botons massa amples */
  text-align: center;
}


.tts-gate{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999999; /* molt per sobre del wizard */
}

.tts-gate-box{
  background: #fff;
  border-radius: 14px;
  padding: 2rem;
  max-width: 420px;
  width: calc(100% - 2rem);
  text-align: center;
}

.text-danger {
    font-size: 2rem;
    background-color: #e55381 !important;
    margin: 0 auto;
    width: 50%;
}


.wizard-suggest{
  margin-top: .5rem;
  border: 2px solid rgba(0,0,0,.12);
  border-radius: .5rem;
  background: #fff;
  max-height: 260px;
  overflow:auto;
}
.wizard-suggest-item{
  padding: .55rem .75rem;
  cursor:pointer;
}
.wizard-suggest-item:hover,
.wizard-suggest-item.is-active{
  background: rgba(0,0,0,.06);
}


.wizard-birth-row{
  display:flex;
  align-items:center;
  gap:.6rem;
  margin-left: 4rem; /* com wizard-field */
}

.wizard-birth-part{
  width: 5.5rem;   /* dia/mes */
  text-align: center;
}

.wizard-birth-year{
  width: 8.5rem;   /* any */
  text-align: center;
}

.wizard-birth-sep{
  font-size: 2rem;
  color: #2e5a2e;
}



@media (orientation: portrait) and (max-width: 900px) {
.wizard-section-top{
    height: 15%;
  }

  .wizard-section-main{
    height: 35%;
  }

  /* Reserva espai inferior perquè el teclat no tapi res */
  .wizard-section-bottom{
    height: 40%;
  }
}



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

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

.thead-taulablanca th {
    font-size: 1.2rem; /* Mida de text com h3 */
    font-family: "Bebas Neue", sans-serif;
    font-weight: normal;
    text-align: center;
    padding: 0.4rem;
    border: 0.1rem solid white;
}

.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;
}

/* Marc de scroll que clipeja el sticky */
.taula-wrap{
  position: relative;
  overflow-x: scroll;
  overflow-y: auto;
  max-height: 70vh;
  background: #fff;
  scrollbar-gutter: stable both-edges;
  padding-right: 0.6rem;
  padding-bottom: 0.45rem;
  box-sizing: border-box;
  scrollbar-width: auto;
  scrollbar-color: #3f4852 #cdd3d8;
}

.taula-wrap::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

.taula-wrap::-webkit-scrollbar-track {
  background: #cdd3d8;
}

.taula-wrap::-webkit-scrollbar-thumb {
  background: #3f4852;
  border-radius: 8px;
  border: 2px solid #cdd3d8;
}

.taula-wrap::-webkit-scrollbar-thumb:hover {
  background: #2f353c;
}

/* Taula base (separate per a sticky estable) */
.taula-ava{
  border-collapse: separate !important;
  border-spacing: 0 !important;
  table-layout: fixed !important;
  box-sizing: border-box;
  margin: 0;
  min-width: max-content;

  /* Alçades sticky de les files de thead */
  --htitle-blank: 0.2rem;
  --htitle-text: 3.2rem;

  /* Amplades de les 2 primeres columnes */
  --col1w: 21.2rem;   /* Alumne */
  --col2w: 8.5rem;    /* 1a columna d’avaluacions (ajusta si cal) */
  --colw: 8.5rem;   /* Amplada per columna d’avaluacions */
}

/* Borders, padding i colors EXISTENTS (no es toquen) */
.taula-ava td { border: solid 2px white !important; }
.taula-ava th { border: solid 2px white !important; color: white; }

/* Amplada de la 1a columna (Alumne) — mantén-la sincronitzada amb el teu min-width */
.taula-ava { --col1w: 21.2rem; }

/* 1a COLUMNA sticky (ja la tens): fem servir la variable */
.taula-ava .col-alumne{
  position: sticky;
  left: 0;
  z-index: 30;
  min-width: var(--col1w);
  background: inherit;                 /* assegura opacitat sota solapaments */
  box-shadow: 2px 0 0 #fff;            /* separador vertical suau */
}

/* 2a COLUMNA sticky (cos de taula) */
.taula-ava tbody td:nth-child(2){
  position: sticky !important;
  left: var(--col1w) !important;
  z-index: 29 !important; /* per sota de la col1 però per sobre de la resta */
  min-width: var(--col2w);
  background: inherit;
  box-shadow: 2px 0 0 #fff;
}

/* 2a COLUMNA sticky (capçaleres) */
.taula-ava thead th:nth-child(2){
  position: sticky !important;
  left: var(--col1w) !important;
  z-index: 99999 !important;
  min-width: var(--col2w);
  background: #000000;
  color: #ffffff;
  border-color: #000000 !important;
  box-shadow: 2px 0 0 #fff;
}

/* --- THEAD: files sticky --- */
.taula-ava thead th{ position: sticky; top: 0; z-index: 90; box-sizing: border-box; vertical-align: bottom; }
.taula-ava thead tr.row-title th{ height: var(--htitle-blank); min-height: var(--htitle-blank); padding: 0; z-index: 92; }
.taula-ava thead tr.row-title-last th{ height: var(--htitle-text); min-height: var(--htitle-text); padding: 0.6rem; z-index: 92; }
.taula-ava thead th.col-alumne{ z-index: 98; }

.taula-ava thead tr.row-title th:not(.col-alumne),
.taula-ava thead tr.row-title-last th {
  min-width: var(--colw);
  width: var(--colw);
}

/* Primera COLUMNA sticky (th i td amb .col-alumne) */
.taula-ava .col-alumne{
  position: sticky;
  left: 0;
  z-index: 30;
  min-width: var(--col1w);
  background: inherit;
  box-shadow: 2px 0 0 #fff;
}

/* Zebra de la primera columna del cos (mantenim colors existents) */
.taula-ava tbody tr:nth-child(odd)  td.col-alumne { background: #edf7e7; }
.taula-ava tbody tr:nth-child(even) td.col-alumne { background: #d3e8b8; }

/* Nota calculada + inputs (mantenim mides) */
.taula-ava td .nota-calc { width: 2rem; font-size: 0.85rem; color: black; font-weight: 400; margin-right: 6px; text-align: right; }
.taula-ava td input[type='text'] { width: 2rem; font-size: 0.85rem; text-align: right; }

/* Focus visual en la cel·la de l’input */
.taula-ava td:has(input:focus) { outline: 2px solid #8ec3c3; outline-offset: -2px; }

/* Botons (no canviem colors) */
.taula-ava button{
  width: 2rem;
  height: 2rem;
  padding: 0.4rem;
  padding-top: 0.5rem !important;
  padding-left: 0.5rem;
  margin-left: 0.2rem;
  margin-right: 0.2rem;
  cursor: pointer;
  color: white;
  border-radius: 0;
  border: 0;
  text-align: center;
}
.taula-ava button.apte-toggle{
  width: auto;
  height: auto;
  min-height: 1.2rem;
  padding: 0.15rem 0.3rem;
  margin-right: 0.35rem;
  font-size: 0.6rem;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}
.taula-ava button.apte-toggle.apte-on{
  background: #aed581;
}
.taula-ava button.apte-toggle.apte-off{
  background: #e55381;
}
.taula-ava button.apte-toggle.apte-warning{
  background: #8bc34a;
}
.taula-ava .nota-calc.calc-warning{
  background: #8bc34a;
  color: #000000;
}
.taula-ava .nota-mismatch input,
.taula-ava .nota-mismatch .nota-calc {
  background: #fff3b0;
  box-shadow: inset 0 0 0 3px #fff3b0;
}
.taula-ava .nota-mismatch .nota-calc {
  padding-right: 0.35rem;
  display: inline-block;
}

/* --- Layout mòbil per avaluacions --- */
@media (max-width: 900px) {
  .contingutpestanya {
    padding: 0 1.5rem 1.5rem;
  }
  .taula-wrap { display: none; }
  .taula-ava-mobile { display: block; }
  .taula-ava-mobile .mobile-eval-panel {
    width: 100%;
  }
  .taula-ava-mobile .mobile-eval-selector {
    position: sticky;
    top: 0;
    z-index: 120;
    background: #ffffff;
    padding: 0.5rem;
    width: 95%;
  }
  .taula-ava-mobile .mobile-eval-selector select {
    width: 100%;
    padding: 0.5rem;
    font-size: 1rem;
  }
  .taula-ava-mobile .mobile-eval-table {
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
  }
  .taula-ava-mobile .mobile-eval-table-wrap {
    width: 100%;
  }
  .taula-ava-mobile .mobile-eval-header-fixed {
    position: sticky;
    top: 0;
    z-index: 115;
  }
  .taula-ava-mobile .mobile-eval-header {
    position: sticky;
    top: 3.1rem;
    z-index: 110;
  }
  .taula-ava-mobile .mobile-eval-header th {
    padding: 0.6rem;
    text-align: center;
  }
  .taula-ava-mobile .mobile-student-name {
    min-width: 12rem;
    background: #edf7e7;
    text-align: left;
  }
  .taula-ava-mobile .mobile-grade-cell {
    background: #edf7e7;
    text-align: center;
    border-top: 2px solid #edf7e7;
  }
  .taula-ava-mobile .mobile-eval-table tbody tr {
    display: block;
    border-bottom: 2px solid #ffffff;
  }
  .taula-ava-mobile .mobile-eval-table tbody td {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }
}
@media (min-width: 901px) {
  .taula-ava-mobile { display: none; }
}

.taula-ava tr.hl-row > td {
  box-shadow: inset 0 0 0 4444px #8ec3c3; /* blaucel suau */
}
.taula-ava td.hl-col, .taula-ava th.hl-col {
  box-shadow: inset 0 0 0 4444px #8ec3c3;  /* taronja suau */
}
.taula-ava thead th.hl-col {
  background-color: #8ec3c3 !important;
  border-color: #8ec3c3 !important;
}

@media (max-width: 900px) {
  .taula-ava tr.hl-row > td,
  .taula-ava td.hl-col,
  .taula-ava th.hl-col {
    box-shadow: none !important;
    background-color: inherit;
  }
  .taula-ava thead th.hl-col {
    background-color: inherit !important;
    border-color: inherit !important;
  }
}

.taula-ava thead th.col-alumne { border-color: #aed581 !important; }

/* Capçaleres verticals (writing-mode) */
.td-vertical2{
  padding: 0.6rem;
  width: var(--colw);
  height: var(--htitle-text);
  text-align: center;
  vertical-align: middle;
}
.vvertical{
  writing-mode: horizontal-tb;
  text-orientation: initial;
  max-height: var(--htitle-text);
  display: block;
  width: 100%;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
  line-height: 1.1;
  font-size: 0.78rem;
  text-align: center;
  color: inherit;
  text-decoration: none;
}

.taula-ava .avaluacio-weight{
  display: block;
  margin-top: 0.2rem;
  font-size: 0.72rem;
  font-weight: 400;
  text-align: center;
}
.taula-ava .avaluacio-actions .fons-blaumari{
  margin-top: 0.2rem;
}
.taula-ava .avaluacio-actions{
  display: flex;
  justify-content: center;
  margin-top: 0.2rem;
}
.taula-ava .title-blank { background-color: #ffffff; border-color: #ffffff !important; padding: 0; }
.taula-ava .title-fill { padding: 0; }
.taula-ava-filar tbody tr:nth-child(even) { background-color: #d3e8b8; }
.taula-ava-filar tbody tr:nth-child(odd) { background-color: #edf7e7; }
.taula-ava .title-fill { border-color: inherit; }

.taula-ava .avaluacio-level-0 { background-color: #aed581; color: #000000; border-color: #aed581 !important; }
.taula-ava .avaluacio-level-1 { background-color: #e6e6e6; color: #000000; border-color: #e6e6e6 !important; }
.taula-ava .avaluacio-level-2 { background-color: #f2f2f2; color: #000000; border-color: #f2f2f2 !important; }
.taula-ava .avaluacio-level-3 { background-color: #f8f8f8; color: #000000; border-color: #f8f8f8 !important; }
.taula-ava .avaluacio-level-4 { background-color: #fcfcfc; color: #000000; border-color: #fcfcfc !important; }

.radiolist .radio, .checklist .checkbox { display:block; margin:.25rem 0; }
.radiolist input, .checklist input { margin-right:.5rem; }

/* Aplica només a radios i checkboxes dins dels formularis */
.form-check-inline {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.3rem;
}

/* Només en aquesta pantalla de còpia */
.copia-ava input[type="radio"],
.copia-ava input[type="checkbox"]{
  opacity: 1 !important;
  position: static !important;
  width: auto;
  height: auto;
  margin-right: .5rem;
}

.copia-ava table.taula td,
.copia-ava table.taula th{
  vertical-align: middle;
  padding: .4rem .6rem;
}

.copia-ava .taula-filar.verd th {
  background-color: #aed581; /* coherent amb la teva paleta */
}



/* 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 */
}

.taula-assistencia th:nth-child(1) {
    background-color: #aed581;
}

.taula-assistencia th:nth-child(2) {
    background-color: #e55381;
}

.taula-assistencia th:nth-child(3) {
    background-color: #bfbfbf;
}

.taula-assistencia th:nth-child(4) {
    background-color: #feb20e;
}

.taula-assistencia tr:nth-child(even) td:nth-child(1) {
    background-color: #d3e8b8;
}

.taula-assistencia tr:nth-child(odd) td:nth-child(1) {
    background-color: #edf7e7;
}

.taula-assistencia tr:nth-child(even) td:nth-child(2) {
    background-color: #f8b8c9;
}

.taula-assistencia tr:nth-child(odd) td:nth-child(2) {
    background-color: #fbd9e3;
}

.taula-assistencia tr:nth-child(even) td:nth-child(3) {
    background-color: #d8d8d8;
}

.taula-assistencia tr:nth-child(odd) td:nth-child(3) {
    background-color: #f2f2f2;
}

.taula-assistencia tr:nth-child(even) td:nth-child(4) {
    background-color: #ffdbab;
}

.taula-assistencia tr:nth-child(odd) td:nth-child(4) {
    background-color: #ffefdb;
}

/* Per a les columnes a partir de la cinquena (repetint verd) */
.taula-assistencia th:nth-child(n+5) {
    background-color: #aed581;
}

.taula-assistencia tr:nth-child(even) td:nth-child(n+5) {
    background-color: #d3e8b8;
}

.taula-assistencia tr:nth-child(odd) td:nth-child(n+5) {
    background-color: #edf7e7;
}


    .bafarada {
        position: relative;
        padding: 0.5rem;
        display: inline-block;
        margin-top: 1rem;
        margin-bottom: 0.5rem;
        color: white;
        font-weight: bold;
        animation: tremolor 0.5s ease-in-out; /* Aplica l'animació */
    }

    /* Triangle a la part superior */
    .bafarada::before {
        content: "";
        position: absolute;
        top: -0.65rem; /* Situat just a sobre del rectangle */
        left: 1rem; /* Desplaçament des de l'extrem esquerre */
        width: 0;
        height: 0rem;
        border-left: 0.7rem solid transparent; /* Costat esquerre transparent */
        border-right: 0.7rem solid transparent; /* Costat dret transparent */
        border-bottom: 0.7rem solid; /* Triangle apuntant cap avall */
    }

 .error-radio {
        position: absolute;
        display: inline-block;
        z-index: 1;
    }

    .error-message {
        position: absolute;
        padding: 0.5rem;
        display: inline-block;
        margin-top: 1rem;
        margin-bottom: 0.2rem;
        color: white;
        font-weight: bold;
        animation: tremolor 0.5s ease-in-out; /* Aplica l'animació */
        background-color: #e55381;
        z-index: 200;
    }

input[type="radio"] {
    opacity: 0;
    position: absolute;
    width: auto;
    height: auto;
}

input[type="radio"]:not(.no-hide) {
    opacity: 100;
    position: absolute;
    width: auto;
    height: auto;
}

.radio-col-B, .radio-col-J, .radio-col-N, .mark-all, .radio-col-2, .radio-col-1_5, .radio-col-1, .radio-col-0_5 {
    opacity: 100 !important;
    position: unset !important;
    width: auto;
    height: auto;
}

input.group-checkbox-hidden {
    position: absolute;
    width: 16px;
    height: 16px;
    opacity: 0; /* Assegura que sigui visible */
}

.admissio {
    opacity: unset !important;  /* Restableix l'opacitat */
    position: relative !important;  /* Canvia la posició a relativa */
    width: auto !important;  /* Ajusta l'amplada a la mida del contingut */
    height: auto !important;  /* Ajusta l'altura a la mida del contingut */
}



    /* Triangle a la part superior */
    .error-message::before {
        content: "";
        position: absolute;
        top: -0.65rem; /* Situat just a sobre del rectangle */
        left: 1rem; /* Desplaçament des de l'extrem esquerre */
        width: 0;
        height: 0rem;
        border-left: 0.7rem solid transparent; /* Costat esquerre transparent */
        border-right: 0.7rem solid transparent; /* Costat dret transparent */
        border-bottom: 0.7rem solid; /* Triangle apuntant cap avall */
        color: #e55381;
    }

    /* Animació de tremolor */
    @keyframes tremolor {
        0% { transform: translateX(0); }
        25% { transform: translateX(-2px); }
        50% { transform: translateX(2px); }
        75% { transform: translateX(-2px); }
        100% { transform: translateX(0); }
    }

.marge_extra_esquerra {
    border-left: 8px solid #ffffff;
}

.marge_extra_dreta {
    border-right: 8px solid #ffffff !important;
}


.vertikal {
     writing-mode: vertical-lr; /* Escriu el text de dalt a baix */
    transform: rotate(-180deg); /* Gira 90° anticlockwise */
    text-align: center; /* Centra el text horitzontalment dins del th */
    vertical-align: middle; /* Centra el text verticalment dins del th */
    white-space: normal; /* Permet trencar línies */
    word-wrap: break-word; /* Permet el trencament automàtic de línies */
    line-height: 1.5; /* Espai entre línies */
    width: 50px; /* Amplada del `th` */
    height: auto; /* Ajusta l'alçada segons el contingut */
    padding: 10px; /* Espai dins del `th` */
}

/* Contenidor que permet el scroll horitzontal */
.taula-fixa-scroll-wrapper {
    overflow-x: auto !important; /* Activa el scroll horitzontal */
    position: relative !important;
    height: 25rem;
}

/* Taula amb format correcte */
.taula-fixa-scroll {
    width: max-content !important; /* Permet que la taula creixi segons el contingut */
    border-collapse: collapse !important;
    table-layout: auto !important;
    z-index: 104;
}

/* Fixar la capçalera de la taula */
.taula-fixa-scroll thead th {
    position: sticky !important;
    top: 0 !important;
    z-index: 5 !important; /* Més alt que les files del tbody */
     /* Color de fons per la capçalera */
}


/* Fixar la primera columna (Alumne/a) */
.taula-fixa-scroll th:first-child,
.taula-fixa-scroll td:first-child {
    position: sticky !important;
    left: 0 !important;
    z-index: 6 !important; /* Ha de ser més alt que la capçalera */
    background-color: inherit !important; /* Manté el fons blanc */
    min-width: 200px; /* Ajusta segons necessitats */
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1); /* Ombra per destacar */
}

/* Fixar la última columna (Accions) */
.taula-fixa-scroll th:last-child,
.taula-fixa-scroll td:last-child {
    position: sticky !important;
    right: 0 !important;
    z-index: 6 !important; /* Mateix nivell que la primera columna */
    background-color: inherit !important; /* Manté el fons blanc */
    min-width: 150px !important; /* Ajusta segons necessitats */
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1); /* Ombra per destacar */
}

/* Assegurar que les files del tbody no es sobreposin a la capçalera */
.taula-fixa-scroll tbody tr {
    position: relative;
    z-index: 1; /* Inferior a thead i sticky columns */
}

/* Estil bàsic per les cel·les */
.taula-fixa-scroll td {
    min-height: 40px; /* Ajusta segons sigui necessari */
    padding: 10px;
}



.taula-pendents {
    width: max-content !important;
    border-collapse: collapse !important;
    table-layout: fixed !important; /* Evita salts d'amplada */
    z-index: 104;
}

/* Fixar la capçalera de la taula */
.taula-pendents thead th {
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
    background-color: white;
    width: 200px; /* Ajusta segons sigui necessari */
}

/* Fixar les primeres 4 columnes */
.taula-pendents th:nth-child(-n+4),
.taula-pendents td:nth-child(-n+4) {
    position: sticky !important;
    z-index: 9 !important;
    background-color: inherit !important;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

/* Assignar un left correcte per a cada columna fixa */
.taula-pendents th:nth-child(1),
.taula-pendents td:nth-child(1) {
    left: 0px !important;
    width: 150px;
}

.taula-pendents th:nth-child(2),
.taula-pendents td:nth-child(2) {
    left: 150px !important;
    width: 120px;
}

.taula-pendents th:nth-child(3),
.taula-pendents td:nth-child(3) {
    left: 270px !important;
    width: 250px;
}

.taula-pendents th:nth-child(4),
.taula-pendents td:nth-child(4) {
    left: 520px !important;
    width: 100px;
}

/* Ajustem la cinquena columna perquè es vegi alineada correctament */
.taula-pendents th:nth-child(5),
.taula-pendents td:nth-child(5) {
    left: 620px !important;
    width: 180px;
}

/* Evitar que les columnes següents es desplacin incorrectament */
.taula-pendents th,
.taula-pendents td {
    white-space: nowrap;
    text-align: center;
}




.desplegables-inputs {
  display: flex !important;
  gap: 0.5rem;
}

/* 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%;
  }
}


.graph {
    border-collapse: collapse; /* Elimina els espais entre les cel·les */
    font-size: 0.7rem; /* Mida de la font */
    table-layout: fixed; /* Força l'ús d'amplades fixes a les columnes */
    min-width: 9rem;
}

.assistencies {
    border-collapse: collapse; /* Elimina els espais entre les cel·les */
    font-size: 0.7rem; /* Mida de la font */
    width: auto !important; /* Amplada basada en el contingut */
    table-layout: fixed; /* Força l'ús d'amplades fixes a les columnes */
}

.assistencies th {
    font-family: "Bebas Neue", sans-serif;
    font-weight: bold;
    color: #ffffff;
    border: 4px solid #ffffff;
    text-align: center;
    padding: 0.5rem;
    background-color: #708090;
} 

.assistencies td {
    margin: 0 !important; /* Elimina el marge */
    border: 4px solid #ffffff; /* Vora blanca prima a la dreta */
    text-align: center; /* Centra el contingut */
    padding: 0.1rem; /* Redueix l'altura de les línies */
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    word-wrap: break-word; /* Força el text llarg a trencar-se en diverses línies */
}

.assistencies .dia {
    background-color: #8ec3c3 !important;
    color: #ffffff !important;
    border: 4px solid #ffffff;
    border-top: 4px solid #ffffff;
    font-weight: bold;
    padding: 0.2rem !important;
}

.assistencies .mes {
    border: 4px solid #ffffff;
    padding: 0.1rem;
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
    background-color: #8ec3c3 !important;
}

.assistencies.miniassistencies-alumne td {
  border-color: #c7e8e8 !important;
}

.miniassistencies {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.miniassistencies-alumne {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.miniassistencies-alumne .caselladia {
    border: 2px solid #c7e8e8;
}

.miniassistencies-alumne .dia {
    border: 2px solid #c7e8e8;
}

.miniassistencies-alumne .mes {
    border: 2px solid #c7e8e8;
}



.assistencies td a.cella-link,
.assistencies td a.alumne-link {
  display: block;
  width: 100%;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.caselladia {
    max-width: 0.9rem;
    min-width: 0.9rem;
    padding-right: 0.2rem !important;
    padding-left: 0.2rem !important;
}

.graph th {
    font-family: "Bebas Neue", sans-serif;
    font-weight: normal;
    color: #ffffff;
    border: 4px solid #ffffff;
    text-align: center;
    padding: 0.5rem;
    background-color: #708090;
    font-size: 1.5rem !important;
} 

.graph td {
    margin: 0 !important; /* Elimina el marge */
    border-left: 1px solid #ffffff; /* Vora blanca prima a l'esquerra */
    border-right: 1px solid #ffffff; /* Vora blanca prima a la dreta */
    text-align: center; /* Centra el contingut */
    min-width: 0.2rem !important; /* Amplada fixa de cada columna */
    line-height: 0.5rem !important; /* Redueix l'altura de les línies */
    word-wrap: break-word; /* Força el text llarg a trencar-se en diverses línies */
}

.graph tbody tr {
    border: none; /* Elimina la vora entre les files */
}

.graph .fons-rosa {
    background-color: #fad1df; /* Rosa */
}

.graph .fons-taronja {
    background-color: #ffe4bf; /* Taronja */
}

.graph .fons-verd {
    background-color: #e6f1d1; /* Verd */
}

.graph .dia {
    background-color: #8ec3c3 !important;
    color: #ffffff !important;
    border: 1px solid #ffffff;
    border-top: 4px solid #ffffff;
    font-weight: bold;
    padding: 0.3rem !important;
}

.graph .dia.first-of-month {
    border-left: 4px solid #ffffff;
}

.graph .dia.last-of-month {
    border-right: 4px solid #ffffff;
}

.mesos {
    background-color: #708090;
    color: #ffffff;
    font-weight: bold;
}

.graph .mes {
    border: 4px solid #ffffff;
    padding: 0.3rem !important;
}

.graph .total {
    padding: 0.3rem !important;
}

.graph .barra {
    padding: 0.2rem !important;
}

.graph .grupple {
    border-bottom: 2px solid grey;
}

.graph .mitjana {
    border-bottom: 2px solid #8ca664;
}


/* Sortides: llistat de cursos dins del torn */
.sortida-courses {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.sortida-course-pill {
  background-color: #c7e8e8;
  display: flex;
  align-items: center;
  font-size: 0.9rem;
}

/* Estat visual quan un pill està seleccionat */
.sortida-course-pill.is-selected {
  outline: 3px solid #8ec3c3;   /* blau cel ja present a la UI */
  filter: none;
  opacity: 1;
}

/* Opcional: quan no està seleccionat i el mode no és "Tots", els difuminem una mica */
.sortida-courses.has-active-filter .sortida-course-pill:not(.is-selected) {
  opacity: .55;
  filter: grayscale(0.2);
}

.sortida-course-code {
  background-color: #c7e8e8;
  padding: 0.3rem 0.6rem;
  width: 2.5rem;
}

.sortida-course-actions {
  background-color: #d8baa9;
  display: block;         /* (igual que inline) */
  align-items: center;    /* no té efecte en block, però es manté per fidelitat */
}

.sortida-send-btn {
  background-color: #d8baa9;
  padding: 0;
  margin-left: 0.3rem;
}



.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 */
}

.pendent {
    width: 6.2rem;
}

.taulapendent {
    height: 100%;
}

.taulapendent tr {
    height: 100%;
}
.pendent-multiplecontainer {
    display: flex;
    flex-direction: row;
}

.pendent-maxcontainer {
    margin: 0.2rem;
}

.pendent-container {
    width: 100%;
    display: flex;
    gap: 0.2rem;
    height: 2.5rem;
    margin-bottom: 0.2rem;
}

.icon-container {
    width: 2.5rem;
    display: flex;
    gap: 0.2rem;
    height: 2.5rem;
    margin: auto;
}

.pendentreclam-container {
    display: flex;
    gap: 0.2rem;
    flex-direction: column; /* Disposa els botons verticalment */
}

.icona {
    padding: 0.5rem 0.5rem;
    pointer: default;
}

.iconamax {
    padding: 0.5rem 0.5rem;
    pointer: default;
    width: 100%;
}

.tic {
    height: 5.2rem;
    width: 100%;
    text-align: center;
    align-items: center;
    vertical-align: middle;
    display: flex;         /* Activa Flexbox */
    justify-content: center; /* Centra horitzontalment */
    align-items: center;    /* Centra verticalment */
}

/* 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;
}

.icona img {
    pointer-events: none; /* Evita que les imatges siguin clicables */
    cursor: default;
}

.icona:hover {
    cursor: default;
}


.icona-link {
    align-items: center;
    text-align: center;
    width: 100%;
    padding: 0.5rem 0.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Suavitat en els efectes */
}

.icona-link: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 */
}


/* Estil del botó a la cantonada dreta */
.cantonada-dreta {
    position: absolute; /* Posició absoluta dins del <thead> */
    right: 0.5rem; /* Ajusta la posició horitzontal */
}



.icona-txt {
    width: 100%;
    height: 2.5rem;
    line-height: 0.7rem; /* Ajusta per alinear verticalment el text */
    text-align: center; /* Centra el text horitzontalment */
    display: flex; /* Utilitza flexbox per alinear millor */
    justify-content: center; /* Centra el contingut horitzontalment */
    align-items: center; /* Centra el contingut verticalment */
    overflow: hidden; /* Amaga el contingut que excedeix les dimensions */
}

.curs {    
    width: 100%;
    height: 100%;
    line-height: 0.7rem; /* Ajusta per alinear verticalment el text */
    text-align: center; /* Centra el text horitzontalment */
    display: flex; /* Utilitza flexbox per alinear millor */
    justify-content: center; /* Centra el contingut horitzontalment */
    align-items: center; /* Centra el contingut verticalment */
    overflow: hidden; /* Amaga el contingut que excedeix les dimensions */
    padding-left: 1rem;
    padding-right: 1rem;
}

.datavacant {    
    width: 100%;
    height: 100%;
    line-height: 0.7rem; /* Ajusta per alinear verticalment el text */
    text-align: center; /* Centra el text horitzontalment */
    display: flex; /* Utilitza flexbox per alinear millor */
    justify-content: center; /* Centra el contingut horitzontalment */
    align-items: center; /* Centra el contingut verticalment */
    overflow: hidden; /* Amaga el contingut que excedeix les dimensions */
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.absenciamacrocontainer {
    display: flex;
    flex-direction: column;
    height: 5.2rem;
    width: 100%;
}

.caducitat-icon {
    width: 2rem !important;
}

.groupviewdatavacant {    
    width: 1rem;
    height: 100%;
    line-height: 0.7rem; /* Ajusta per alinear verticalment el text */
    text-align: center; /* Centra el text horitzontalment */
    display: flex; /* Utilitza flexbox per alinear millor */
    justify-content: center; /* Centra el contingut horitzontalment */
    align-items: center; /* Centra el contingut verticalment */
    overflow: hidden; /* Amaga el contingut que excedeix les dimensions */
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.groupviewabsenciamacrocontainer {
    display: flex;
    flex-direction: column;
    height: 2.5rem;
    width: 7rem;
}


.multi {
    display: flex;
    gap: 0.2rem;
    flex-direction: row;
}

.absencia-container {
    display: flex;
    gap: 0.2rem;
    height: 2.5rem;
    margin-bottom: 0.2rem;
}

.curs-container {
    display: flex;
    gap: 0.2rem;
    height: 2.5rem;
    margin-bottom: 0.2rem;
}

.absenciareclam-container {
    width: 100%;
    display: flex;
    height: 2.5rem;
    margin-bottom: 0.2rem;
}

.dates-container {
    display: flex;
    align-items: center;
    height: 2.5rem;
    cursor: default;
}

.dates {
    height: 100%;
    display: flex; /* Activa Flexbox */
    justify-content: center; /* Centra horitzontalment */
    align-items: center; /* Centra verticalment */
    text-align: center; /* Centra el text dins del contenidor */
    line-height: 0.7rem; /* Manté la línia de text compacta */
    padding-left: 0.4rem;
    padding-right: 0.4rem;
}

.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: 640px) {
  #taula-estadistiques thead,
  #taula-estadistiques thead tr,
  #taula-estadistiques th {
    display: none !important;
  }
}

@media (max-width: 640px) {
  .taula-sortides thead,
  .taula-sortides thead tr,
  .taula-sortides thead th {
    display: none !important;
  }
}

/* --- Taula alumnes (Sortides) --- */
.taula-alumnes .fila-desktop { display: table-row; }
.taula-alumnes .xs-name-row,
.taula-alumnes .xs-th-row,
.taula-alumnes .xs-input-row { display: none; }

/* Zebra per files desktop */
.fila-desktop.alt-a { background: #f9f9ff; } /* to normal blaucel/clar */
.fila-desktop.alt-b { background: #f1f5ff; }

/* (Opcional) assegura que les files mòbil prenguin el color del tr */
tr.xs-name-row.xs-alt-a,
tr.xs-th-row.xs-alt-a,
tr.xs-input-row.xs-alt-a { background: #f9f9ff; }

tr.xs-name-row.xs-alt-b,
tr.xs-th-row.xs-alt-b,
tr.xs-input-row.xs-alt-b { background: #f1f5ff; }


/* Mòbil */
@media (max-width: 700px) {
    .taula-alumnes {
        width: 100%;
    }
  .taula-alumnes thead.fixed-second-header { display: none !important; }

  /* Mostra només la versió mòbil */
  .taula-alumnes .fila-desktop { display: none !important; }
  .taula-alumnes .xs-name-row,
  .taula-alumnes .xs-th-row,
  .taula-alumnes .xs-input-row { display: table-row !important; }

  /* Disseny grid i padding */
  .taula-alumnes .xs-td { padding: .5rem .6rem; }
  .taula-alumnes .xs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .5rem;
    align-items: center;
  }
  .taula-alumnes .xs-grid > div { text-align: center; }
  .taula-alumnes .xs-th { font-weight: 600; }

  /* Colors alterns per blocs d'alumne */
  .taula-alumnes .xs-alt-a td,
  .taula-alumnes .xs-alt-a th { background-color: #c7e8e8; } /* blaucel suau */
  .taula-alumnes .xs-alt-b td,
  .taula-alumnes .xs-alt-b th { background-color: #e4f4f4; } /* un to més fosc */

  /* Separador visual entre alumnes */
  .taula-alumnes .xs-name-row.xs-alt-a td,
  .taula-alumnes .xs-name-row.xs-alt-b td {
    border-top: 6px solid #fff;
  }
}

/* Contenidor de filtres XS: només en pantalles petites */
.filtres-xs {
  display: none;
  margin: 0 0 1rem 0;
}
.filtres-xs .inputs {
  display: grid;
  grid-template-columns: 1fr;
  gap: .5rem;
}

@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;
    */
  }
}


.taula td {
    border: 2px solid white;
    padding: 0.2rem;
    padding-left: 1vh;
    padding-right: 1vh;
}

.tauladades {
margin-bottom: -1.2rem;
}

.columnafix {
    width: 10rem;
    max-width: 10rem;
}

.columnaample {
    width: 15rem;
    max-width: 15rem;
}

.columnamitjana {
    width: 7rem;
    max-width: 7rem;
}

.accions .botomini  {
    background-color: #d8baa9 !important;
}

.accions .botomini:hover  {
    background-color: black !important;
}

.columna1 {
    width: 1rem;
    max-width: 1rem;
}
.columna2 {
    width: 2rem;
    max-width: 2rem;
}
.columna3 {
    width: 3rem;
    max-width: 3rem;
}
.columna4 {
    width: 4rem;
    max-width: 4rem;
}

.columna5 {
    width: 5rem;
    max-width: 5rem;
}

.columna6 {
    width: 6rem;
    max-width: 6rem;
}

.columna7 {
    width: 7rem;
    max-width: 7rem;
}

.columna8 {
    width: 8rem;
    max-width: 8rem;
}

.columna9 {
    width: 9rem;
    max-width: 9rem;
}

.columna10 {
    width: 10rem;
    max-width: 10rem;
}

.columna11 {
    width: 11rem;
    max-width: 11rem;
}

.columna12 {
    width: 12rem;
    max-width: 12rem;
}

.columna13 {
    width: 13rem;
    max-width: 13rem;
}

.columna14 {
    width: 14rem;
    max-width: 14rem}

.columna15 {
    width: 15rem;
    max-width: 15rem;
}

.columna16 {
    width: 16rem;
    max-width: 16rem;
}

.columna17 {
    width: 17rem;
    max-width: 17rem;
}

.columna18 {
    width: 18rem;
    max-width: 18rem;
}

.columna19 {
    width: 19rem;
    max-width: 19rem;
}

.columna20 {
    width: 20rem;
    max-width: 20rem;
}

.columna21 {
    width: 21rem;
    max-width: 21rem;
}
.columna25 {
    width: 25rem;
    max-width: 25rem;
}

.columna30 {
    width: 30rem;
    max-width: 30rem;
}

.columna40 {
    width: 40rem;
    max-width: 40rem;
}

.columna50 {
    width: 50rem;
    max-width: 50rem;
}

.columna70 {
    width: 70rem;
    max-width: 70rem;
}

.columna80 {
    width: 80rem;
    max-width: 80rem;
}

.columna90 {
    width: 90rem;
    max-width: 90rem;
}

.columnaboto {
    width: 5rem;
    max-width: 5rem;
}

.columnavalor {
    width: 3rem;
    max-width: 3rem;
}

.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;
    }
}

/* Wizard d'alta: en pantalles petites, els modals ocupen els 2/3 superiors */
@media (max-width: 900px) {
  .wizard-mode .message {
    justify-content: flex-start;
    align-items: stretch;
    padding-top: 2vh;
    box-sizing: border-box;
  }

  .wizard-mode .message-box {
    width: min(92vw, 720px);
    max-height: 66vh;
    margin: 0 auto;
    margin-bottom: 0;
    padding: 1.25rem 1rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
  }

  .wizard-mode .message > div:first-child {
    max-width: 100%;
    padding-bottom: 0;
  }
}

.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: 2px solid #ccc;
    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: 1px solid #ccc;
    border-bottom: 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: 2px solid white;
}
.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 {
    display: none;
}

/* 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: #d2a5ab; color: #4f0b14; }   /* grana tènue */
.toggle-label.valor-2 { background-color: #efb3b3; color: #7f1d1d; }   /* vermell tènue */
.toggle-label.valor-3 { background-color: #fff1a8; color: #6b5a00; }   /* groc tènue */
.toggle-label.valor-4 { background-color: #b8e3c0; color: #14532d; }   /* verd tènue */
.toggle-label.valor-nsnc { background-color: #ccc; color: #333; }   /* gris */

/* Colors seleccionats per valor */
.toggle-radio:checked + .valor-1 { background-color: #6b0f1a; color: #fff; }
.toggle-radio:checked + .valor-2 { background-color: #d62828; color: #fff; }
.toggle-radio:checked + .valor-3 { background-color: #ffd60a; color: #222; }
.toggle-radio:checked + .valor-4 { background-color: #2a9d3f; color: #fff; }
.toggle-radio:checked + .valor-nsnc { background-color: #999; color: #fff; }

/* 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;
    box-sizing: border-box;
}

.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;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .pantalla-completa {
        padding: 1rem;
    }

    .pregunta {
        width: 100%;
        padding: 1rem;
    }
}

.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 */
    }
  }
}
