/* ========================================================= */
/* === PERFIL (perfil.css) — Layout i seccions principals === */
/* ========================================================= */

.perfil-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}

/* 🟨 Contenidor de candidatures (ja estilitzat correctament) */
.candidatures-container {
  max-width: 500px;
  margin: 40px auto;
  margin-top: 70px;
  padding: 2rem;
  background: #fff;
  border: 2px solid #d4af37;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

/* Escola - ofertes publicades */
.section-title {
  font-size: 1.4em;
  color: #1a237e; /* blau fosc elegant */
  font-weight: 700;
  border-left: 4px solid #d4af37; /* línia daurada decorativa */
  padding-left: 12px;
  margin-bottom: 1rem;
  font-family: 'Segoe UI', 'Helvetica Neue', sans-serif;
}

/*Marge formulari perfil*/

#perfil-page .form-container {
  margin-top: 70px; /* ajustable */
}

/* Perfil + candidatures */
  .perfil-grid { grid-template-columns: 1fr; gap: 2rem; padding: 0 10px; }
  .candidatures-container { margin-top: 0; }
  #candidatures-list li { font-size: 1em; padding: 1rem; }

/* ========================================================= */
/* === CANDIDATURES ENVIADES === */
/* ========================================================= */

#candidatures-list {
  list-style: none; /* ✅ treu el punt */
  padding: 0;
  margin: 0;
}

#candidatures-list li {
  border-radius: 16px;
  padding: 1.2rem 1.6rem;
  margin-bottom: 16px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  font-size: 1.05rem;
  color: #333;
  position: relative;
  line-height: 1.6;
  max-width: 100%;
  word-break: break-word;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#candidatures-list li strong {
  font-weight: 600; /* ✅ negreta per Oferta, Zona, Data */
}

/* Bafarada: triangle apuntant avall */
#candidatures-list li::after {
  content: "";
  position: absolute;
  left: 30px;
  top: 100%;
  width: 0;
  height: 0;
  border: 10px solid transparent;
  border-top-color: #fefefe; /* mateix fons que bafarada */
  transition: border-top-color 0.3s ease;
}

/* Hover: amplifica i triangle daurat */
#candidatures-list li:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

#candidatures-list li:hover::after {
  border-top-color: #d4af37; /* ✅ triangle daurat */
}




/* Selecciona qualsevol <li> dins d’un div amb id que comença per "candidatures-" */
[id^="candidatures-"] {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

[id^="candidatures-"] li {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  transition: transform .08s ease, box-shadow .12s ease;
  margin-bottom: 10px; /* separació extra */
}

[id^="candidatures-"] li:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0,0,0,.08);
}

[id^="candidatures-"] li strong {
  font-weight: 600;
  color: #111;
}

[id^="candidatures-"] li .email {
  color: #4b5b6b;
  text-decoration: none;
  border-bottom: 1px dotted rgba(0,0,0,.15);
}
[id^="candidatures-"] li .email:hover {
  border-bottom-color: #4b5b6b;
}

/*Desplegable candidatures panell escola*/

.cand-toggle{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:10px 12px;
  border:1px solid #eee;
  border-radius:12px;
  background:#fff;
  cursor:pointer;
  margin-top:8px; /* opcional */
}

.cand-toggle .section-title {
  font-weight: 700;
  font-size: 16px;
  color: #1a3c8c; /* blau corporatiu */
}

.cand-toggle:hover {
  background: #f9fafb;
}


/* Fletxa amb animació */
.cand-toggle .chev{ transition: transform .25s ease; }
.cand-toggle[aria-expanded="true"] .chev{ transform: rotate(180deg); }

/* Panell plegable */
.cand-panel{
  overflow:hidden;
  max-height:0;
  transition:max-height .25s ease;
}

/* Missatge quan no hi ha candidatures */
.candidatura-empty {
  background: #f9fafb; /* un to més clar que el blanc */
  border: 1px dashed #ddd;
  border-radius: 12px;
  padding: 14px 16px;
  text-align: center;
  color: #6b7a8c;
  font-style: italic;
  box-shadow: none;
}


/* Badges per al CV */
.cv-ok {
  background:#f3fbf6;
  border:1px solid #c9e7d9;
  color:#166534;
  font-weight:600;
  padding:4px 10px;
  border-radius:999px;
  font-size:13px;
}
.cv-pendent {
  background:#fff8e6;
  border:1px solid #f6d58b;
  color:#8a6d1f;
  font-weight:600;
  padding:4px 10px;
  border-radius:999px;
  font-size:13px;
}
.cv-blocat {
  background:#f4f6f8;
  border:1px solid #e5e7eb;
  color:#6b7280;
  font-weight:600;
  padding:4px 10px;
  border-radius:999px;
  font-size:13px;
}
.cv-desbloqueig {
  background:#fff;
  border:1px solid #d1d5db;
  padding:4px 10px;
  border-radius:8px;
  text-decoration:none;
}
.cv-desbloqueig:hover {
  background:#f9fafb;
}

/* Xip de data */
.candidatura-date {
  margin-left: auto;
  font-size: 12px;
  color: #6b7280;
  background: #f4f6f8;
  border: 1px solid #e5e7eb;
  padding: 4px 8px;
  border-radius: 999px;
}


/* Botó de nova oferta panell escola */

#nova-oferta-form .btn-primary:hover {
  background: linear-gradient(135deg, #a67c00, #d4af37); /* daurat */
  color: black;
}
/*panells escola */

.panell-dues-columnes {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: flex-start;
}

.columna-esquerra,
.columna-dreta {
  flex: 1 1 45%;
  min-width: 320px;
}


/* ========================================================= */
/* === MODAL PERFIL CENTRE ================ */
/* ========================================================= */

/* === MODAL GENERAL === */
#modal-perfil-escola .modal-content {
  background: #ffffff;
  border-radius: 20px;
  padding: 2rem 2.2rem;
  max-width: 480px;
  width: 90%;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
  animation: fadeInScale 0.25s ease-out;
}

/* Animació */
@keyframes fadeInScale {
  from { transform: scale(0.92); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* Títol */
#modal-perfil-escola h3 {
  font-size: 1.4rem;
  color: #1a237e;
  font-weight: 700;
  margin-bottom: 1rem;
  text-align: center;
}

/* Formulari */
#formulari-perfil-centre {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

/* Labels */
#formulari-perfil-centre label {
  font-weight: 600;
  font-size: 0.95rem;
  color: #1a237e;
}

/* Inputs */
#formulari-perfil-centre input,
#formulari-perfil-centre textarea {
  width: 100%;
  font-size: 1rem;
  padding: 0.55rem 0.8rem;
  border-radius: 12px;
  border: 1.5px solid #ddd;
  background: #fafafa;
  transition: all 0.2s ease;
  outline: none;
}

/* Input focus */
#formulari-perfil-centre input:focus,
#formulari-perfil-centre textarea:focus {
  border-color: #1a237e;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(26, 35, 126, 0.12);
}

/* Textarea */
#formulari-perfil-centre textarea {
  min-height: 90px;
  resize: vertical;
}

/* Botó Desar canvis */
#formulari-perfil-centre button[type="submit"] {
  margin-top: 0.6rem;
  padding: 0.75rem;
  background: linear-gradient(135deg, #1a237e, #3949ab);
  color: white;
  border: none;
  border-radius: 14px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s ease;
}

#formulari-perfil-centre button[type="submit"]:hover {
  background: linear-gradient(135deg, #1a237e, #283593);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

/* Botó TANCA */
#modal-perfil-escola .btn-tancar {
  margin-top: 1rem;
  text-align: center;
  color: #1a237e;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .2s;
}

#modal-perfil-escola .btn-tancar:hover {
  opacity: 0.6;
}

.logo-preview {
  margin: 10px 0 20px 0;
  text-align: center;
}

.logo-centre-preview {
  max-width: 170px;
  max-height: 170px;
  border-radius: 14px;
  border: 2px solid #d4af37;
  padding: 6px;
  background: white;
  object-fit: contain;
}


/* === RESPONSIVE === */
@media (max-width: 480px) {

  /* Reduir marges laterals */
  #modal-perfil-escola .modal-content {
    padding: 1.4rem 1.2rem;
    width: 94%;
    border-radius: 16px;
  }

  /* Títol més petit */
  #modal-perfil-escola h3 {
    font-size: 1.25rem;
  }

  /* Inputs més compactes */
  #formulari-perfil-centre input,
  #formulari-perfil-centre textarea {
    padding: 0.55rem 0.7rem;
    font-size: 0.95rem;
    border-radius: 10px;
  }

  /* Botó de desar */
  #formulari-perfil-centre button[type="submit"] {
    font-size: 0.95rem;
    padding: 0.65rem;
    border-radius: 12px;
  }

  /* Logo preview més petit */
  .logo-centre-preview {
    max-width: 90px;
    max-height: 90px;
    padding: 3px;
    border-width: 1.5px;
  }

  /* Botó de tancar */
  #modal-perfil-escola .btn-tancar {
    margin-top: 0.8rem;
    font-size: 0.9rem;
  }
}

/* --- Prevenir desbordaments del modal --- */
#modal-perfil-escola .modal-content {
  box-sizing: border-box;
  overflow-y: auto;
  max-height: 85vh;
}



/* ========================================================= */
/* === RESPONSIVE PERFIL (≤900px i ≤600px) ================ */
/* ========================================================= */

/* 📱 Tauletes i pantalles mitjanes */
@media (max-width: 900px) {
  .perfil-grid {
    grid-template-columns: 1fr;   /* passa a 1 sola columna */
    gap: 1.5rem;
    padding: 0 16px;
    max-width: 100%;              /* ✅ evita columnes estretes */
    width: 100%;                  /* ✅ força amplada completa */
    margin: 0 auto;
  }

  .candidatures-container {
    margin-top: 40px;
    padding: 1.5rem;
    max-width: 100%;              /* ✅ elimina el límit fix de 500px */
    width: 100%;
  }

  .section-title {
    font-size: 1.25em;
    margin-bottom: 0.8rem;
  }
}

/* 📱 Mòbils petits */
@media (max-width: 600px) {
  .perfil-grid {
    display: flex;                /* ✅ canvia a flex per evitar errors de grid */
    flex-direction: column;
    align-items: stretch;
    gap: 1.2rem;
    margin: 20px auto;
    padding: 0 12px;
    width: 100%;
    max-width: 100%;
  }

  .candidatures-container {
    padding: 1.2rem;
    border-width: 1px;
    width: 100%;
    max-width: 100%;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
  }

  #candidatures-list li {
    padding: 1rem 1.2rem;
    font-size: 1rem;
    line-height: 1.5;
  }

  .section-title {
    font-size: 1.1em;
    border-left-width: 3px;
    padding-left: 8px;
  }

  /* ✅ formulari sense desbordaments */
  input[type="text"],
  input[type="file"],
  input[type="email"],
  select,
  textarea {
    width: 100%;
    box-sizing: border-box;
  }

  /* ✅ botó Desa gran i centrat */
  .btn--primary {
    width: 100%;
    font-size: 1rem;
    padding: 12px;
    border-radius: 8px;
  }
}

/* 📱 Extra: iPhone molt petit (≤400px) */
@media (max-width: 400px) {
  .candidatures-container {
    padding: 1rem;
  }

  #candidatures-list li {
    font-size: 0.9rem;
  }

  .section-title {
    font-size: 1rem;
  }
}

/* Botó PERFIL, posició a l'esquerra */
.perfil-esq {
  position: absolute;
  top: 220px;  /* abans 15px */
  left: 100px;
  z-index: 10;
}


/* Botó TORNAR centrat a sobre */
.tornar-centre {
  margin-top: 60px !important;
  display: block;
}


/* Donem aire al header perquè no es solapin */
.site-header {
  position: relative;
  padding-top: 110px !important;
}

/* Avatar rodó del centre */
.perfil-escola-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #d4af37;
  background: #d4af37;
  color: white;
  font-size: 1.8rem;
  font-weight: 700;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(0,0,0,0.15);
  transition: transform .15s ease;
}

.perfil-escola-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


.perfil-escola-avatar:hover {
  transform: scale(1.05);
}


@media (max-width: 600px) {

  .perfil-esq {
    top: 95px !important;   /* posat sota el botó Tornar */
    left: 12px !important;  /* arraconat a l’esquerra */
  }

  .perfil-escola-avatar {
    width: 42px;
    height: 42px;
    font-size: 1.2rem;
  }

  /* Evitem que el header quedi exageradament alt al mòbil */
  .site-header {
    padding-top: 70px !important;
  }
}

/* =========================================================
   ✅ CONSENTIMENT Recomanacions (Hard isolate)
   ========================================================= */

#consentRecomBox{
  all: unset;               /* ← LA CLAU */
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;

  margin-top: 16px;
  padding: 12px;

  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
}

/* 🔥 Important: torna a definir estils bàsics dins (all:unset els mata) */
#consentRecomBox *{
  all: unset;
  box-sizing: border-box;
}

#consentRecomBox .consent-inner{
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

#consentRecomBox input[type="checkbox"]{
  all: revert;
  margin-top: 3px;
}

#consentRecomBox .consent-text{
  display: block;
  flex: 1;
  min-width: 0;
}

#consentRecomBox .consent-title{
  display: block;
  font-weight: 700;
  line-height: 1.25;
}

#consentRecomBox .consent-help{
  display: block;
  margin-top: 6px;
  font-size: 0.9em;
  color: #555;
  line-height: 1.35;
}

/* espai clar entre el consent box i el botó */
#consentRecomBox{
  margin-bottom: 18px !important;
}

/* i per assegurar-ho encara més: el botó amb aire a dalt */
#perfil-form button[type="submit"]{
  margin-top: 14px !important;
}


#consentRecomBox .consent-inner{
  width: 100%;
}

/* =========================================================
   ✅ TOP 5 DOCENTS RECOMANATS (PANELL ESCOLA)
   ========================================================= */

.recomanats-box{
  margin-top: 12px;
  padding: 14px 14px;
  border: 1px solid #eee;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

/* Títol: blau + línia daurada com section-title */
.recomanats-title{
  font-weight: 800;
  font-size: 15px;
  color: #1a237e;
  border-left: 4px solid #d4af37;
  padding-left: 10px;
  margin-bottom: 10px;
}

/* Llista */
.recomanats-list{
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

/* Item */
.recomanat-item{
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  transition: transform .08s ease, box-shadow .12s ease;
}

.recomanat-item:hover{
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0,0,0,.08);
}

.recomanat-item strong{
  font-weight: 700;
  color: #111;
}

/* Meta: especialitat + localitat */
.recomanat-meta{
  color: #4b5b6b;
  font-size: 13px;
}

/* Badge CV */
.recomanat-badge{
  margin-left: auto;
  background:#f3fbf6;
  border:1px solid #c9e7d9;
  color:#166534;
  font-weight:700;
  padding:4px 10px;
  border-radius:999px;
  font-size:12px;
}

/* Badge quan no té CV */
.recomanat-badge.pending{
  background:#fff8e6;
  border:1px solid #f6d58b;
  color:#8a6d1f;
}

/* Empty */
.recomanats-empty{
  background: #f9fafb;
  border: 1px dashed #ddd;
  border-radius: 12px;
  padding: 12px 14px;
  text-align: center;
  color: #6b7a8c;
  font-style: italic;
  box-shadow: none;
}

/* =========================================================
   💸 MONETITZACIÓ: Recomanats bloquejats (no premium)
   (si després ho pintem per JS)
   ========================================================= */

.recomanats-lock{
  background: #fff8e6;
  border: 1px solid #f6d58b;
  border-radius: 12px;
  padding: 12px 14px;
  display: grid;
  gap: 10px;
}

.recomanats-lock strong{
  color:#1a237e;
  font-weight:800;
}

.recomanats-cta{
  display:flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.recomanats-cta a{
  display:inline-block;
  padding: 8px 12px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 800;
  font-size: 13px;
}

/* CTA premium */
.recomanats-cta .cta-premium{
  background: linear-gradient(135deg, #1a237e, #3949ab);
  color: #fff;
}

/* CTA 1,99€ */
.recomanats-cta .cta-unlock{
  background: #fff;
  border: 1px solid #d1d5db;
  color: #111;
}
.recomanats-cta .cta-unlock:hover{
  background: #f9fafb;
}

.cv-btn{
  cursor:pointer;
  border:none;
}
.cv-btn:hover{
  opacity:.9;
  transform:translateY(-1px);
}

/* =========================================================
   🌙 DARK MODE — PERFIL (SIMPLE I CLAR)
   ========================================================= */

[data-theme="dark"] .candidatures-container {
  background: #111827;
  border-color: #d4af37;
  color: #e5e7eb;
}

[data-theme="dark"] .section-title {
  color: #e5e7eb;
  border-left-color: #d4af37;
}

/* Llista de candidatures */
[data-theme="dark"] #candidatures-list li,
[data-theme="dark"] [id^="candidatures-"] li {
background: #1e293b;
  border-color: rgba(255,255,255,0.08);
  color: #e5e7eb;
}

/* Textos secundaris */
[data-theme="dark"] .candidatura-date,
[data-theme="dark"] .meta,
[data-theme="dark"] .recomanat-meta {
  color: #9ca3af;
}

/* Panells desplegables */
[data-theme="dark"] .cand-toggle {
  background: #111827;
  border-color: rgba(255,255,255,0.08);
  color: #e5e7eb;
}

/* Recomanats */
[data-theme="dark"] .recomanats-box,
[data-theme="dark"] .recomanat-item {
background: #1e293b;
  border-color: rgba(255,255,255,0.08);
  color: #e5e7eb;
}

/* ===== DARK — Recomanats refinat ===== */

[data-theme="dark"] .recomanats-title{
  color:#f3f4f6;
  border-left-color:#d4af37;
}

[data-theme="dark"] .recomanat-badge{
  background: rgba(34,197,94,.15);
  border:1px solid rgba(34,197,94,.35);
  color:#22c55e;
}

[data-theme="dark"] .recomanat-badge.pending{
  background: rgba(250,204,21,.12);
  border:1px solid rgba(250,204,21,.35);
  color:#fde047;
}

[data-theme="dark"] .recomanats-lock{
  background: rgba(212,175,55,.08);
  border:1px solid rgba(212,175,55,.35);
}

[data-theme="dark"] .recomanats-lock strong{
  color:#f5d36a;
}

[data-theme="dark"] .recomanats-cta .cta-unlock{
  background:#1f2937;
  border:1px solid rgba(255,255,255,.15);
  color:#e5e7eb;
}

[data-theme="dark"] .recomanats-cta .cta-unlock:hover{
  background:#111827;
}

[data-theme="dark"] [id^="candidatures-"] li strong,
[data-theme="dark"] .recomanat-item strong {
  color: #f9fafb;
}

[data-theme="dark"] .candidatura-date {
  background: #1f2937;
  border: 1px solid rgba(255,255,255,.08);
  color: #cbd5e1;
}

[data-theme="dark"] .cv-ok,
[data-theme="dark"] .recomanat-badge {
  background: rgba(34,197,94,.18);
  border: 1px solid rgba(34,197,94,.45);
  color: #22c55e;
}



/* Modal perfil escola */
[data-theme="dark"] #modal-perfil-escola .modal-content {
  background: #111827;
  color: #e5e7eb;
}

[data-theme="dark"] #formulari-perfil-centre input,
[data-theme="dark"] #formulari-perfil-centre textarea {
  background: #020617;
  color: #e5e7eb;
  border-color: rgba(255,255,255,0.15);
}

/* ✅ DARK: triangle bafarada */
[data-theme="dark"] #candidatures-list li::after{
  border-top-color: #0f172a;
}
[data-theme="dark"] #candidatures-list li:hover::after{
  border-top-color: #d4af37;
}

/* ===== FIX DARK — CONSENT BOX ===== */

[data-theme="dark"] #consentRecomBox{
  background: #0f172a;
  border-color: rgba(255,255,255,.08);
}

[data-theme="dark"] #consentRecomBox .consent-title{
  color: #e5e7eb;
}

[data-theme="dark"] #consentRecomBox .consent-help{
  color: #94a3b8;
}

[data-theme="dark"] #consentRecomBox *{
  color: inherit;
}


/* =========================================================
   🌙 DARK MODE — ESPAI DOCENT
   ========================================================= */

/* Cards principals */
[data-theme="dark"] .bd-space__card{
  background: #0f172a;
  border-color: rgba(255,255,255,.08);
  box-shadow: none;
  color: #e5e7eb;
}

/* Títols */
[data-theme="dark"] .bd-space__title,
[data-theme="dark"] .bd-space__cardTitle{
  color: #f3f4f6;
}

/* Subtítols */
[data-theme="dark"] .bd-space__subtitle,
[data-theme="dark"] .bd-space__cardSub{
  color: #9ca3af;
}

/* Pill visibilitat */
[data-theme="dark"] .bd-pill{
  background: rgba(255,255,255,.06);
  color: #e5e7eb;
}

[data-theme="dark"] .bd-pill.is-public{
  background: rgba(34,197,94,.18);
  color: #22c55e;
}

/* Targetes docents */
[data-theme="dark"] .bd-user-card{
  background: #111827;
  border: 1px solid rgba(255,255,255,.06);
  color: #e5e7eb;
}

/* Nom i rol */
[data-theme="dark"] .bd-user-name{
  color: #f9fafb;
}

[data-theme="dark"] .bd-user-role{
  color: #9ca3af;
}

/* Botó veure */
[data-theme="dark"] .bd-user-view{
  background: rgba(255,255,255,.08);
  color: #e5e7eb;
}

/* Chat */
[data-theme="dark"] .bd-chat{
  background: #0f172a;
  border-color: rgba(255,255,255,.08);
}

[data-theme="dark"] .bd-chat__header{
  border-color: rgba(255,255,255,.08);
}

[data-theme="dark"] .bd-chat__messages{
  background: #0b1220;
}

[data-theme="dark"] .bd-chat-msg{
  background: #1f2937;
  color: #e5e7eb;
}

[data-theme="dark"] .bd-chat-msg.me{
  background: #d4af37;
  color: #000;
}

[data-theme="dark"] .bd-chat__input{
  border-color: rgba(255,255,255,.08);
}

[data-theme="dark"] .bd-chat__input input{
  background: #020617;
  color: #e5e7eb;
  border-color: rgba(255,255,255,.15);
}

/* ===== PREMIUM CARD ===== */

[data-theme="dark"] .premium-label{
  background:#111827;
  border:1px solid #d4af37;
  color:#e5e7eb;
}

/* ===== PROGRESS CARD ===== */

[data-theme="dark"] .bd-progress-card{
  background:#0f172a;
  border:1px solid rgba(255,255,255,.08);
  color:#e5e7eb;
}

[data-theme="dark"] .bd-progress-bar{
  background:rgba(255,255,255,.08);
}

[data-theme="dark"] .bd-progress-subtitle,
[data-theme="dark"] .bd-progress-hint{
  color:#94a3b8;
}

[data-theme="dark"] .bd-dot{
  background:rgba(255,255,255,.25);
}

/* ===== SIDEBAR DARK ===== */

[data-theme="dark"] .bd-sidebar__title{
  color:#9ca3af;
}

[data-theme="dark"] .bd-sidebar__link{
  color:#cbd5e1;
}

[data-theme="dark"] .bd-sidebar__link:hover{
  background:rgba(255,255,255,.06);
}

[data-theme="dark"] .bd-sidebar__link.active{
  background:rgba(212,175,55,.18);
  color:#d4af37;
}

/* ===== CAROUSEL NAV DARK ===== */

[data-theme="dark"] .bd-carousel-nav{
  background:#1f2937;
  color:#e5e7eb;
  box-shadow:none;
  border:1px solid rgba(255,255,255,.08);
}

/*Dins espai docent - numero de docents que segueixes*/

.bd-count{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:22px;
  height:22px;
  padding:0 8px;
  border-radius:999px;
  background: rgba(212,175,55,.18);
  color:#8a6a00;
  font-weight:900;
  font-size:12px;
  margin-left:8px;
}
.bd-following-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;

  /* 👇 LIMIT VISUAL */
  max-height: calc(7 * 56px); /* 7 files aprox */
  overflow-y: auto;
  padding-right: 8px; /* una mica més d’aire */
}

/* ===== Scroll daurat ===== */
.bd-following-list::-webkit-scrollbar {
  width: 7px;
}

.bd-following-list::-webkit-scrollbar-track {
  background: rgba(212, 175, 55, 0.12);
  border-radius: 999px;
}

.bd-following-list::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #d4af37, #b8962e);
  border-radius: 999px;
}

.bd-following-list::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #e0bf4a, #c9a23a);
}

/* Firefox */
.bd-following-list {
  scrollbar-width: thin;
  scrollbar-color: #d4af37 rgba(212, 175, 55, 0.12);
}

.bd-following-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px; /* 👈 important pel càlcul */
}

/* ✅ Inbox (extra segur) */
#inboxListBD {
  max-height: calc(7 * 56px);
  overflow-y: auto;
  padding-right: 8px;
  margin-top: 12px;
}


.bd-space__card .bd-following-list{
  overflow-y: auto;
}

.bd-space__divider {
  height: 1px;
  margin: 24px 0;
  background: linear-gradient(
    to right,
    transparent,
    rgba(212, 175, 55, 0.6),
    transparent
  );
}

/*icona misssatge*/
.bd-following-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bd-following-info {
  flex: 1;
  min-width: 0;
}

.bd-msg-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
  opacity: 0.7;
}

.bd-msg-btn:hover {
  opacity: 1;
}

/*Seguiment dels no llegits amb puntet*/

.bd-following-item.is-unread{
  background: rgba(212,175,55,.10);
}

.bd-unread-dot{
  display:inline-block;
  width:8px;
  height:8px;
  margin-left:6px;
  border-radius:999px;
  background:#d4af37;
  box-shadow: 0 0 0 2px rgba(212,175,55,.18);
}

.bd-sidebar-badge {
  margin-left: 6px;
  background: #ef4444;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 999px;
  line-height: 1;
}

