/* Nexcola · components propis (sobre la base visual de Brúixola i Acollida) */
.nx-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.nx-gap-sm { gap: 8px; justify-content: flex-start; }
.small { font-size: 13px; }
.sec-title { font-size: 18px; font-weight: 900; display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.list { padding: 0; overflow: hidden; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.list-item:last-child { border-bottom: 0; }
.list-item:hover { background: var(--sky); }
.nx-card-link { display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--ink); }
.nx-card-link:hover { border-color: var(--blue); }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.c-ora { color: var(--ora-d); } .c-vio { color: #5B21B6; }
@media (max-width: 760px) { .nx-hide-sm { display: none !important; } }

/* Barra superior */
.nx-bell { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; color: var(--ink); margin-right: 6px; }
.nx-bell:hover { background: var(--sky); }
.nx-badge { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--mag); color: #fff; font-size: 11px; font-weight: 900; display: flex; align-items: center; justify-content: center; }
.topnav a.nx-emerg { color: #9C0053; gap: 6px; }
.topnav a.nx-emerg.is-on { background: var(--mag-bg); color: #9C0053; }

/* Cerca */
.nx-cerca { position: relative; }
.nx-cerca input { width: 100%; min-height: 50px; border: 1.5px solid var(--line); border-radius: 14px; padding: 0 16px; font-size: 16px; background: var(--white); }
.nx-cerca-res { position: absolute; z-index: 15; left: 0; right: 0; top: calc(100% + 6px); background: var(--white); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 32px rgba(31,42,51,.14); max-height: 360px; overflow: auto; padding: 6px; }
.nx-cerca-res a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; text-decoration: none; color: var(--ink); }
.nx-cerca-res a:hover { background: var(--sky); }
.nx-cerca-res img, .nx-ini-sm { width: 36px; height: 36px; border-radius: 10px; object-fit: cover; background: var(--sky); flex-shrink: 0; }
.nx-cerca-res p { padding: 10px; }

/* Sessions del dia */
.nx-sessions { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.nx-ses { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--white); border: 1.5px solid var(--line); border-radius: var(--r-md); text-decoration: none; color: var(--ink); }
.nx-ses:hover { border-color: var(--blue); }
.nx-ses .grow { gap: 0; }
.nx-ses-h { font-size: 20px; font-weight: 900; color: var(--blue); min-width: 58px; }
.nx-ses-ara { border-color: var(--blue); box-shadow: 0 0 0 3px var(--sky); }
.nx-ses-tard { border-color: #F3C58C; }
.nx-ses-feta { opacity: .85; }

/* Totes les classes */
.nx-llegenda { display: flex; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.nx-classe { display: flex; align-items: center; gap: 14px; padding: 10px 14px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); flex-wrap: wrap; }
.nx-classe-nom { font-weight: 900; font-size: 17px; min-width: 110px; text-decoration: none; color: var(--ink); }
.nx-franges { display: flex; gap: 6px; flex-wrap: wrap; }
.nx-fr { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--white); color: var(--mut); font-weight: 800; font-size: 14px; text-decoration: none; }
.nx-fr-feta { background: var(--ok-bg); border-color: #A9D8C2; color: var(--grn-d); }
.nx-fr-tard { background: var(--warn-bg); border-color: #F3C58C; color: var(--ora-d); }

/* ---------- Passar llista ---------- */
.nx-llista-pag { padding-bottom: 96px; }
.nx-llista-cap { display: flex; gap: 16px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; }
.nx-llista-cap h1 { font-size: 30px; }
.nx-materia { font-size: 20px; color: var(--mut); font-weight: 800; }
.nx-comptadors { display: flex; gap: 8px; }
.nx-cnt { min-width: 84px; padding: 8px 10px; border-radius: 14px; display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.nx-cnt b { font-size: 24px; font-weight: 900; }
.nx-cnt span { font-size: 12px; font-weight: 800; }
.nx-cnt-p { background: var(--ok-bg); color: var(--grn-d); }
.nx-cnt-a { background: #FFEDD5; color: #7C2D12; }
.nx-cnt-r { background: #EDE9FE; color: #4C1D95; }
.nx-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.nx-tabs a { flex-shrink: 0; min-height: 40px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--white); color: var(--ink); text-decoration: none; font-weight: 800; font-size: 14px; }
.nx-tabs a.feta { color: var(--grn-d); }
.nx-tabs a.is-on { background: var(--blue); border-color: var(--blue); color: var(--white); }
.nx-filtres { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.nx-filtre { flex-shrink: 0; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--white); font-weight: 800; font-size: 14px; cursor: pointer; }
.nx-filtre span { color: var(--mut); font-weight: 700; }
.nx-filtre.is-on { background: var(--ink); border-color: var(--ink); color: var(--white); }
.nx-filtre.is-on span { color: #C9D2D9; }
.nx-lot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--sky); padding: 8px 12px; border-radius: 12px; font-weight: 700; font-size: 14px; }

.nx-graella { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
@media (max-width: 560px) { .nx-graella { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } }
.nx-cel { position: relative; transition: opacity .15s; }
.nx-cel.nx-atenuat { opacity: .28; }
.nx-al { width: 100%; appearance: none; font: inherit; color: var(--ink); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 10px 6px 10px; border-radius: 16px; border: 2px solid #DBE3EE; background: var(--white); text-align: center; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: manipulation; min-height: 150px; }
.nx-al:active { transform: scale(.98); }
.nx-foto { position: relative; display: block; width: 76px; height: 76px; }
.nx-foto img, .nx-ini { width: 76px; height: 76px; border-radius: 18px; object-fit: cover; display: flex; align-items: center; justify-content: center; background: #CFE3F5; color: #1E293B; font-weight: 900; font-size: 24px; }
@media (max-width: 560px) { .nx-foto, .nx-foto img, .nx-ini { width: 66px; height: 66px; } .nx-al { min-height: 136px; } }
.nx-etq { position: absolute; left: 50%; bottom: -7px; transform: translateX(-50%); white-space: nowrap; font-size: 11px; font-weight: 900; padding: 1px 8px; border-radius: 999px; background: #C2410C; color: #fff; }
.nx-nom { font-size: 14px; font-weight: 800; line-height: 1.15; margin-top: 4px; }
.nx-icones { display: flex; gap: 5px; justify-content: center; color: var(--mut); min-height: 16px; }
.nx-ic-aco { color: #B7791F; }
.nx-ic-salut { color: #C2410C; }
.nx-prev { font-size: 11px; font-weight: 800; color: var(--mut); }
.nx-prev-absent { color: #9A3412; } .nx-prev-retard { color: #5B21B6; }
.nx-e-absent { background: #FFF4EC; border-color: #C2410C; }
.nx-e-absent img { filter: grayscale(1); opacity: .5; }
.nx-e-absent.nx-just { border-style: dashed; background: #FFF8F2; }
.nx-e-absent.nx-just .nx-etq { background: #FED7AA; color: #7C2D12; }
.nx-e-retard { background: #F5F3FF; border-color: #6D28D9; }
.nx-e-retard .nx-etq { background: #6D28D9; }
.nx-e-sortida { background: #EEF4F8; border-color: #005A84; }
.nx-e-sortida .nx-etq { background: #005A84; }
.nx-e-sortida img { opacity: .6; }
.nx-mes { position: absolute; top: 4px; right: 4px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: transparent; color: var(--mut); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.nx-mes:hover { background: var(--sky); }
.nx-barra { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; background: var(--white); border-top: 1px solid var(--line); padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0)); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; box-shadow: 0 -6px 20px rgba(31,42,51,.06); }
.nx-barra-txt { font-size: 14px; font-weight: 700; color: var(--mut); }
@media (max-width: 560px) { .nx-barra-txt { display: none; } .nx-barra > div { width: 100%; } .nx-barra .btn { flex: 1; } }
.nx-pulsa { box-shadow: 0 0 0 4px var(--sky); }
.nx-dialeg { border: 0; border-radius: 20px; padding: 20px; width: min(420px, 92vw); box-shadow: 0 20px 50px rgba(31,42,51,.25); }
.nx-dialeg::backdrop { background: rgba(31,42,51,.4); }
.nx-estats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.nx-estat-op { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 12px; border-radius: 12px; border: 1.5px solid var(--line); font-weight: 800; cursor: pointer; }
.nx-estat-op:has(input:checked) { border-color: var(--blue); background: var(--sky); }

/* Fitxa de l'alumne */
.nx-fitxa-cap { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.nx-fitxa-cap img, .nx-fitxa-cap .nx-ini { width: 96px; height: 96px; border-radius: 22px; object-fit: cover; }
.nx-timeline { display: flex; flex-direction: column; gap: 6px; }
.nx-timeline div { display: flex; gap: 10px; align-items: center; }
.nx-calendari { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.nx-calendari .cap { font-size: 12px; font-weight: 800; color: var(--mut); text-align: center; }
.nx-dia { aspect-ratio: 1.4; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; background: var(--white); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.nx-dia small { font-size: 10px; font-weight: 700; }
.nx-dia.st-present { background: var(--ok-bg); color: var(--grn-d); border-color: #A9D8C2; }
.nx-dia.st-absent, .nx-dia.st-parcial { background: #FFEDD5; color: #7C2D12; border-color: #F3C58C; }
.nx-dia.st-justificada, .nx-dia.st-parcial_j, .nx-dia.st-previst { background: #F4F1EA; color: var(--mut); border-style: dashed; }
.nx-dia.st-retard { background: #EDE9FE; color: #4C1D95; border-color: #C4B5FD; }
.nx-dia.st-sortida { background: var(--sky); color: var(--blue); }
.nx-dia.st-festiu { background: transparent; border-color: transparent; color: #B8BEC4; }
.nx-dia.buit { visibility: hidden; }
.nx-dia.avui { outline: 3px solid var(--blue); outline-offset: 1px; }
.nx-salut { background: #FFF4EC; border: 1.5px solid #F3C58C; border-radius: var(--r-md); padding: 14px; }
.nx-taula { width: 100%; border-collapse: collapse; font-size: 14px; }
.nx-taula th, .nx-taula td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.nx-taula th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--mut); }
.nx-wrap { overflow-x: auto; }
.nx-graella-mes td, .nx-graella-mes th { padding: 4px 5px; text-align: center; font-size: 12px; border: 1px solid var(--line); }
.nx-graella-mes td:first-child, .nx-graella-mes th:first-child { text-align: left; white-space: nowrap; position: sticky; left: 0; background: var(--white); }
.nx-c-A, .nx-c-a { background: #FFEDD5; color: #7C2D12; font-weight: 900; }
.nx-c-J, .nx-c-j { background: #F4F1EA; color: var(--mut); font-weight: 800; }
.nx-c-R { background: #EDE9FE; color: #4C1D95; font-weight: 900; }
.nx-c-S { background: var(--sky); color: var(--blue); font-weight: 900; }

/* Emergència */
.nx-emerg-cap { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.nx-emerg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.nx-emerg-grup { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; }
.nx-emerg-grup h3 { margin: 0 0 6px; font-size: 16px; display: flex; justify-content: space-between; }
.nx-emerg-grup ul { margin: 0; padding: 0; list-style: none; font-size: 14px; columns: 2; column-gap: 10px; }
.nx-emerg-grup li.fora { color: #B8BEC4; text-decoration: line-through; }
.nx-emerg-grup li.dubte { color: var(--ora-d); font-weight: 800; }
@media print {
  .appbar, .nx-no-print, .bottom-nav, .nx-barra { display: none !important; }
  .main { padding: 0; }
  .nx-emerg-grid { grid-template-columns: repeat(3, 1fr); }
  .nx-emerg-grup { break-inside: avoid; }
}

/* ---------- App de famílies ---------- */
.fx-body { background: var(--bg); }
.fx-fill { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); }
.fx-fill .nx-ini { width: 58px; height: 58px; border-radius: 16px; font-size: 20px; }
.fx-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; max-width: 560px; margin: 0 auto; background: var(--white); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(3, 1fr); padding-bottom: env(safe-area-inset-bottom, 0); }
.fx-nav a { min-height: 62px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; color: var(--mut); font-size: 12px; font-weight: 800; position: relative; border-top: 3px solid transparent; }
.fx-nav a.is-on { color: var(--blue); border-top-color: var(--blue); }
.fx-nav .nx-badge { top: 6px; right: calc(50% - 22px); }
.fx-main { padding: 18px 16px 96px; }
.fx-codi { font-size: 30px; letter-spacing: 10px; text-align: center; font-weight: 900; }
.fx-install { background: var(--sky); border-radius: var(--r-md); padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.fx-avis { display: flex; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.fx-avis.nou { background: #F2F8FC; }
.fx-avis:last-child { border-bottom: 0; }
.fx-avis time { font-size: 12px; color: var(--mut); white-space: nowrap; }

/* Mòbil: capçalera de la llista i barra superior */
.nx-llista-cap > .grow { flex: 1 1 280px; }
.nx-llista-cap .kicker { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.topnav { min-width: 0; }
@media (max-width: 560px) {
  .nx-comptadors { width: 100%; }
  .nx-cnt { flex: 1; min-width: 0; }
  .nx-llista-cap h1 { font-size: 26px; }
  .nx-materia { font-size: 16px; display: block; }
  .appbar { gap: 4px; padding: 0 10px; }
  .appbar .brand { display: none; }
  .topnav { margin-left: 6px; gap: 2px; }
  .topnav a { padding: 0 8px; }
  .topnav .nx-menu-sm { display: none; }
  .nx-bell { width: 40px; margin-right: 0; }
}
.nx-chk { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; font-weight: 700; line-height: 1.35; cursor: pointer; }
.nx-chk input { width: 22px; height: 22px; margin: 0; flex-shrink: 0; accent-color: var(--blue); }
.nx-check { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.nx-check li::before { content: '✗ '; color: #9C0053; font-weight: 900; }
.nx-check li.ok::before { content: '✓ '; color: var(--grn-d); }
.nx-xifra { font-size: 22px; } .nx-xifra b { font-size: 32px; font-weight: 900; color: var(--blue); }
.nx-avis-cfg { border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.nx-tutor { border-top: 1px solid var(--line); padding: 10px 0; }
.nx-tutor summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.nx-2col { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }

/* Guia */
.nx-guia { display: flex; flex-direction: column; gap: 14px; }
.nx-guia ol { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 4px; }
.nx-guia-index { display: flex; flex-wrap: wrap; gap: 6px; }
.nx-guia-index a { font-size: 13px; font-weight: 800; padding: 4px 10px; border-radius: 999px; background: var(--white); border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.nx-guia-nota { background: var(--sky); color: var(--blue-d); border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.nx-guia-img { border: 1px solid var(--line); border-radius: 12px; max-width: 100%; height: auto; box-shadow: 0 6px 18px rgba(31,42,51,.08); }
.nx-guia-sec { scroll-margin-top: 80px; }

/* ---------- Menjador ---------- */
.c-ok { color: var(--grn-d); }
.nx-menj { display: flex; flex-direction: column; gap: 18px; }
.nx-menj-grup .sec-title { margin-top: 0; }
.nx-menj .nx-al { min-height: 160px; }
.nx-m-present { background: var(--ok-bg); border-color: #2F855A; }
.nx-m-present .nx-etq { background: #2F855A; }
.nx-m-absent { background: #FFF4EC; border-color: #C2410C; }
.nx-m-absent img { filter: grayscale(1); opacity: .5; }
.nx-m-pendent .nx-etq:empty, .nx-m-present .nx-etq:empty { display: none; }
.nx-m-escola { box-shadow: inset 0 0 0 2px #F3C58C; }
.nx-menj-al { display: flex; gap: 4px; align-items: flex-start; font-size: 12px; font-weight: 800; color: #9A3412; background: #FFEDD5; border-radius: 8px; padding: 2px 6px; line-height: 1.2; text-align: left; }
.nx-menj-al svg { flex-shrink: 0; margin-top: 1px; }
.nx-menj-tags { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.chip.sm { font-size: 11px; padding: 1px 7px; min-height: 0; }
.nx-menus { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.nx-menu-dia { display: flex; flex-direction: column; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; }
.nx-menu-dia input { min-height: 38px; font-size: 14px; }
.nx-ins td, .nx-ins th { vertical-align: middle; }
.nx-ins .center { text-align: center; }
.nx-ck { width: 22px; height: 22px; accent-color: var(--blue); }
.nx-col { border: 0; background: var(--sky); border-radius: 8px; padding: 4px 8px; font-weight: 900; cursor: pointer; }
/* Famílies */
.fx-menu { display: flex; flex-direction: column; gap: 2px; }
.nx-dia.st-fix { background: #DBEAFE; color: #1E3A8A; border-color: #93C5FD; }
.nx-dia.st-esporadic { background: var(--ok-bg); color: var(--grn-d); border-color: #A9D8C2; }
.nx-dia.st-baixa { background: #F1F5F9; color: #64748B; text-decoration: line-through; }
.nx-dia.st-no { background: var(--white); }
.nx-dia.obert { cursor: pointer; }
.nx-dia.obert:hover { border-color: var(--blue); }
.nx-dia .tova { font-size: 9px; font-weight: 900; color: #92400E; text-decoration: none; }
.fx-opcio { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 14px; border-radius: 14px; border: 1.5px solid var(--line); font-weight: 800; cursor: pointer; background: var(--white); }
.fx-opcio:has(input:checked) { border-color: var(--blue); background: var(--sky); }
.fx-opcio input { width: 20px; height: 20px; }
.nx-menj-data { display: flex; align-items: center; gap: 8px; }
.nx-menj-data h1 { font-size: clamp(20px, 5.6vw, 30px); margin: 0; }
.nx-menj-data .pill { flex-shrink: 0; padding: 0 12px; }
.nx-guia-imgs { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.nx-guia-imgs .nx-guia-img { flex: 0 1 auto; min-width: 0; max-height: 640px; width: auto; }

/* =========================================================================
   Marc v2 (desembre 2026): menú lateral + barra de context. Model per a totes les pantalles.
   ========================================================================= */
:root { --side-w: 232px; --side-plegat: 72px; --top-h: 56px; --ink-2: #3D4852; --mut-2: #5B6672; --line-2: #DDE3EA; --fons: #F3F5F8; }
.nx-body { background: var(--fons); }
.nx-shell { display: flex; min-height: 100dvh; }
.nx-side { position: sticky; top: 0; height: 100dvh; width: var(--side-w); flex-shrink: 0; display: flex; flex-direction: column; background: #fff; border-right: 1px solid var(--line-2); z-index: 40; transition: width .15s; }
.nx-side-logo { display: flex; align-items: center; gap: 10px; height: var(--top-h); padding: 0 16px; text-decoration: none; color: var(--blue); flex-shrink: 0; }
.nx-side-logo b { display: block; font-size: 18px; font-weight: 900; line-height: 1.05; }
.nx-side-logo small { display: block; font-size: 11px; font-weight: 700; color: var(--mut-2); }
.nx-side-scroll { flex: 1; overflow-y: auto; padding: 4px 0; }
.nx-side-sec { display: block; padding: 14px 20px 6px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #6B7580; }
.nx-side-a { display: flex; align-items: center; gap: 12px; height: 40px; margin: 1px 10px; padding: 0 10px; border-radius: 10px; text-decoration: none; font: inherit; font-size: 14px; font-weight: 700; color: var(--ink-2); border: 0; background: transparent; cursor: pointer; width: calc(100% - 20px); box-sizing: border-box; text-align: left; }
.nx-side-a svg { flex-shrink: 0; }
.nx-side-a:hover { background: var(--fons); color: var(--ink); }
.nx-side-a.is-on { background: #E3EEF8; color: var(--blue); font-weight: 900; }
.nx-side-a.is-off { opacity: .55; cursor: default; }
.nx-side-a.is-off:hover { background: transparent; }
.nx-side-txt { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nx-side-tag { font-size: 10px; font-weight: 800; padding: 1px 6px; border-radius: 6px; background: #EEF1F4; color: var(--mut-2); }
.nx-side-ext { color: #8A939B; display: flex; }
.nx-side-peu { padding: 8px 0 12px; border-top: 1px solid var(--line-2); }
.nx-side-plega { color: var(--mut-2); }
html.nx-plegat .nx-side { width: var(--side-plegat); }
html.nx-plegat .nx-side .nx-side-txt, html.nx-plegat .nx-side .nx-side-tag, html.nx-plegat .nx-side .nx-side-ext, html.nx-plegat .nx-side-sec { display: none; }
html.nx-plegat .nx-side-a { justify-content: center; padding: 0; }
html.nx-plegat .nx-side-sec + .nx-side-a { margin-top: 10px; }
html.nx-plegat .nx-side-logo { justify-content: center; padding: 0; }
.nx-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.nx-top { position: sticky; top: 0; z-index: 30; height: var(--top-h); display: flex; align-items: center; gap: 12px; padding: 0 20px; padding-top: env(safe-area-inset-top, 0); background: #fff; border-bottom: 1px solid var(--line-2); }
.nx-top-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; border: 0; background: transparent; color: var(--ink); cursor: pointer; position: relative; flex-shrink: 0; }
.nx-top-btn:hover { background: var(--fons); }
.nx-top .nx-bell { margin: 0; border-radius: 10px; }
.nx-top .nx-badge { top: 3px; right: 3px; background: #B42318; }
.nx-top-menu { display: none; }
.nx-crumbs { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 13px; font-weight: 700; color: var(--mut-2); white-space: nowrap; overflow: hidden; }
.nx-crumbs a { color: var(--mut-2); text-decoration: none; }
.nx-crumbs a:hover { color: var(--blue); text-decoration: underline; }
.nx-crumbs [aria-current] { color: var(--ink); font-weight: 900; }
.nx-top-cerca { flex: 1; max-width: 420px; margin: 0 auto; }
.nx-top-cerca-camp { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px 0 12px; border-radius: 10px; background: var(--fons); border: 1px solid var(--line-2); color: var(--mut-2); }
.nx-top-cerca-camp:focus-within { border-color: var(--blue); background: #fff; }
.nx-top-cerca input, .nx-cerca .nx-top-cerca-camp input { flex: 1; min-width: 0; min-height: 0; height: 36px; border: 0; padding: 0; background: transparent; font: inherit; font-size: 14px; color: var(--ink); border-radius: 0; }
.nx-top-cerca input:focus { outline: none; }
.nx-top-cerca kbd { font: inherit; font-size: 11px; font-weight: 800; padding: 1px 6px; border-radius: 6px; border: 1px solid #C9D2DC; color: var(--mut-2); }
.nx-top-emerg { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 10px; border: 1.5px solid #E3B4AE; background: #FFF5F4; color: #B42318; font-size: 14px; font-weight: 800; text-decoration: none; flex-shrink: 0; }
.nx-top-emerg:hover, .nx-top-emerg.is-on { background: #B42318; border-color: #B42318; color: #fff; }
.nx-main { flex: 1; padding: 18px 22px 32px; width: 100%; box-sizing: border-box; }
.nx-main > * { max-width: 1320px; margin-left: auto; margin-right: auto; }
.nx-main > .flash { margin-bottom: 12px; }
.nx-main-plena > * { max-width: none; }
.nx-side-fons { position: fixed; inset: 0; background: rgba(15, 23, 42, .3); z-index: 35; }
@media (max-width: 1100px) { .nx-top-cerca kbd { display: none; } }
@media (max-width: 900px) {
  .nx-side { position: fixed; left: 0; top: 0; transform: translateX(-105%); transition: transform .18s; width: var(--side-w) !important; box-shadow: 0 0 40px rgba(15,23,42,.2); }
  html.nx-plegat .nx-side .nx-side-txt, html.nx-plegat .nx-side .nx-side-sec, html.nx-plegat .nx-side .nx-side-tag, html.nx-plegat .nx-side .nx-side-ext { display: revert; }
  html.nx-plegat .nx-side-a { justify-content: flex-start; padding: 0 10px; }
  html.nx-plegat .nx-side-logo { justify-content: flex-start; padding: 0 16px; }
  .nx-side.is-obert { transform: none; }
  .nx-side-plega { display: none; }
  .nx-top-menu { display: inline-flex; }
  .nx-top { padding: 0 10px; gap: 6px; }
  .nx-crumbs { flex: 1; }
  .nx-top-cerca { display: none; }
  .nx-top-emerg span { display: none; }
  .nx-top-emerg { padding: 0 10px; }
  .nx-main { padding: 14px 12px 28px; }
}

/* ---------- Passar llista v2 ---------- */
.nx-ll { display: flex; flex-direction: column; gap: 10px; }
@media (min-width: 900px) and (min-height: 560px) {
  .nx-main-plena:has(.nx-ll) { padding-bottom: 14px; padding-top: 12px; }
  .nx-ll { height: calc(100dvh - var(--top-h) - 26px); }
  .nx-main-plena:has(.nx-ll) > .flash { position: fixed; top: calc(var(--top-h) + 8px); left: 50%; transform: translateX(-50%); z-index: 60; max-width: 560px; box-shadow: 0 10px 30px rgba(15,23,42,.15); }
}
.nx-ll-fila { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-height: 44px; flex-shrink: 0; }
.nx-ll-grup { position: relative; }
.nx-ll-grup summary { list-style: none; display: flex; align-items: center; gap: 6px; cursor: pointer; border-radius: 10px; padding: 2px 6px 2px 2px; }
.nx-ll-grup summary::-webkit-details-marker { display: none; }
.nx-ll-grup summary:hover { background: #E6EBF0; }
.nx-ll-grup summary svg { transform: rotate(90deg); color: var(--mut-2); }
.nx-ll-grup h1 { margin: 0; font-size: 28px; font-weight: 900; line-height: 1.1; }
.nx-ll-grups { position: absolute; z-index: 50; top: calc(100% + 6px); left: 0; width: 420px; max-height: 70vh; overflow: auto; background: #fff; border: 1px solid var(--line-2); border-radius: 14px; box-shadow: 0 14px 36px rgba(15,23,42,.16); padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.nx-ll-grups-et { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #6B7580; margin-top: 6px; }
.nx-ll-grups-g { display: flex; flex-wrap: wrap; gap: 6px; }
.nx-ll-grups-g a { padding: 6px 10px; border-radius: 9px; border: 1px solid var(--line-2); text-decoration: none; color: var(--ink); font-weight: 800; font-size: 14px; }
.nx-ll-grups-g a:hover { border-color: var(--blue); }
.nx-ll-grups-g a.is-on { background: var(--blue); border-color: var(--blue); color: #fff; }
.nx-ll-mat { font-size: 14px; font-weight: 800; color: var(--mut-2); }
.nx-seg { display: inline-flex; padding: 3px; border-radius: 12px; background: #E6EBF0; gap: 2px; flex-wrap: wrap; }
.nx-seg a { display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 12px; border-radius: 9px; font-size: 13px; font-weight: 800; color: var(--mut-2); text-decoration: none; white-space: nowrap; }
.nx-seg a:hover { color: var(--ink); }
.nx-seg a.is-on { background: #fff; color: var(--blue); box-shadow: 0 1px 3px rgba(15,23,42,.15); }
.nx-seg a.feta svg { color: #1D7A46; }
.nx-ll-dia { display: flex; align-items: center; gap: 2px; font-size: 14px; font-weight: 700; color: var(--ink-2); }
.nx-ll-dia .nx-top-btn { width: 32px; height: 32px; }
.nx-top-btn.is-off { opacity: .3; cursor: default; }
.nx-ll-cnt { display: flex; gap: 6px; flex-wrap: wrap; }
.nx-pil { display: inline-flex; align-items: baseline; gap: 5px; padding: 5px 11px; border-radius: 10px; font-size: 13px; font-weight: 800; white-space: nowrap; }
.nx-pil b { font-size: 18px; font-weight: 900; }
.nx-pil-p { background: #E4F4EA; color: #1D5E3A; }
.nx-pil-a { background: #FDEBDD; color: #8A2F0A; }
.nx-pil-r { background: #EEE8FB; color: #4C2A99; }
.nx-pil-s { background: #E3EEF8; color: #1D4E7A; }
.nx-pil-zero { opacity: .55; }
.nx-ll-eines { min-height: 40px; gap: 8px; }
.nx-ll-filtres { display: flex; gap: 6px; flex-wrap: wrap; }
.nx-fc { appearance: none; font: inherit; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 999px; border: 1.5px solid var(--line-2); background: #fff; color: var(--ink); font-size: 13px; font-weight: 800; cursor: pointer; }
.nx-fc:hover { border-color: #AEB9C5; }
.nx-fc.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.nx-fc b { font-weight: 900; }
.nx-ll-info { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: 8px; background: #FFF4E5; color: #7A4100; font-size: 13px; font-weight: 700; white-space: nowrap; }
.nx-ll-lot { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; color: var(--ink-2); }
.nx-ll-lot .nx-fc { height: 32px; }
.nx-ll-estat { font-size: 13px; font-weight: 800; white-space: nowrap; }
.nx-ll-estat.is-ok { color: #1D5E3A; }
.nx-ll-estat.is-pendent { color: #8A6100; }
.nx-btn-md { min-height: 40px; height: 40px; padding: 0 16px; font-size: 14px; border-radius: 10px; }
.nx-ll .nx-graella { gap: 10px; }
.nx-ll .nx-graella.nx-encaixa { flex: 1; min-height: 0; overflow: hidden; align-content: start; }
.nx-ll .nx-cel { --foto: 72px; position: relative; display: flex; flex-direction: column; min-height: 0; border-radius: 14px; border: 1.5px solid var(--line-2); background: #fff; transition: opacity .15s, background .12s; overflow: hidden; }
.nx-ll .nx-graella:not(.nx-encaixa) .nx-cel { min-height: 150px; }
.nx-ll .nx-tap { appearance: none; font: inherit; color: inherit; flex: 1; min-height: 0; width: 100%; border: 0; background: transparent; padding: 10px 6px 2px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; cursor: pointer; }
.nx-ll .nx-tap:active { transform: scale(.98); }
.nx-ll .nx-foto, .nx-ll .nx-foto img, .nx-ll .nx-ini { width: var(--foto); height: var(--foto); }
.nx-ll .nx-graella.nx-encaixa .nx-cel { --foto: inherit; }
.nx-ll .nx-graella.nx-encaixa { --foto: 72px; }
.nx-ll .nx-foto img, .nx-ll .nx-ini { border-radius: 16px; font-size: calc(var(--foto) * .34); }
.nx-ll .nx-nom { font-size: 15px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.nx-ll .nx-prev { margin-top: -2px; }
.nx-xips { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 3px; padding: 0 4px 7px; min-height: 26px; flex-shrink: 0; }
.nx-xip { display: inline-flex; align-items: center; gap: 2px; height: 20px; padding: 0 4px; border-radius: 6px; font-size: 10.5px; font-weight: 900; cursor: help; }
.nx-xip svg { width: 14px; height: 14px; }
.nx-x-aco { background: #FFF6D6; color: #7A5A00; }
.nx-x-men { background: #EEF1F4; color: #3D4852; }
.nx-x-tova { background: #FEF3C7; color: #92400E; }
.nx-x-bus { background: #E3EEF8; color: #1D4E7A; }
.nx-x-sol { background: #EAF5EE; color: #1D5E3A; }
.nx-x-salut { background: #FDEBDD; color: #A8380B; }
.nx-x-restr { background: #B42318; color: #fff; }
.nx-x-mes { background: #F1EDFA; color: #4C2A99; }
.nx-x-mesa { background: #FDEBDD; color: #8A2F0A; }
.nx-ll .nx-mes { top: 3px; right: 3px; width: 30px; height: 30px; border-radius: 8px; }
.nx-ll .nx-e-absent { background: #FFF1E6; border: 2px solid #C2410C; }
.nx-ll .nx-e-absent.nx-just { background: #FFF8F2; border-style: dashed; }
.nx-ll .nx-e-absent .nx-foto img { filter: grayscale(1); opacity: .45; }
.nx-ll .nx-e-retard { background: #F6F2FF; border: 2px solid #6D28D9; }
.nx-ll .nx-e-sortida { background: #EEF5FC; border: 2px solid #1D5FA8; }
.nx-ll .nx-e-sortida .nx-etq { background: #1D5FA8; }
.nx-ll .nx-e-absent:not(.nx-just) .nx-etq { background: #C2410C; color: #fff; }
.nx-toast { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 70; max-width: min(560px, calc(100vw - 24px)); }
.nx-toast .flash { box-shadow: 0 10px 30px rgba(15,23,42,.18); margin: 0; }
/* Panell lateral: model per a tots els detalls */
.nx-panell-fons { position: fixed; inset: 0; background: rgba(15,23,42,.18); z-index: 80; }
.nx-panell { position: fixed; top: 0; right: 0; bottom: 0; width: 400px; max-width: 100vw; background: #fff; box-shadow: -12px 0 32px rgba(15,23,42,.14); z-index: 81; display: flex; flex-direction: column; outline: none; }
.nx-panell-cap { display: flex; align-items: center; gap: 12px; padding: 16px 16px 14px; border-bottom: 1px solid var(--line-2); }
.nx-panell-cap b { display: block; font-size: 19px; font-weight: 900; line-height: 1.15; }
.nx-panell-foto img, .nx-panell-foto .nx-ini { width: 60px; height: 60px; border-radius: 14px; object-fit: cover; display: flex; align-items: center; justify-content: center; background: #CFE3F5; font-weight: 900; }
.nx-panell-cos { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 14px; }
.nx-panell-estats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.nx-pe { display: flex; align-items: center; justify-content: center; height: 42px; border-radius: 10px; border: 1.5px solid var(--line-2); font-size: 13px; font-weight: 800; cursor: pointer; }
.nx-pe input { position: absolute; opacity: 0; pointer-events: none; }
.nx-pe:has(input:focus-visible) { outline: 3px solid var(--blue); outline-offset: 2px; }
.nx-pe-present:has(input:checked) { background: #E4F4EA; border-color: #2F855A; color: #1D5E3A; }
.nx-pe-absent:has(input:checked) { background: #FFF1E6; border-color: #C2410C; color: #8A2F0A; }
.nx-pe-retard:has(input:checked) { background: #F6F2FF; border-color: #6D28D9; color: #4C2A99; }
.nx-pe-sortida:has(input:checked) { background: #EEF5FC; border-color: #1D5FA8; color: #1D4E7A; }
.nx-panell-hora { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 14px; }
.nx-panell-hora input { min-height: 40px; }
.nx-panell-info { display: flex; flex-direction: column; gap: 14px; }
.nx-pi { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.nx-pi-tit { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #6B7580; }
.nx-pi-fila { display: flex; justify-content: space-between; gap: 10px; }
.nx-pi-fila span { color: var(--ink-2); }
.nx-pi-fila a { text-decoration: none; }
.nx-pi-absent { color: #8A2F0A; } .nx-pi-retard { color: #4C2A99; } .nx-pi-sortida { color: #1D4E7A; } .nx-pi-present { color: #1D5E3A; }
.nx-pi-caixa { margin: 0; padding: 8px 10px; border-radius: 10px; background: var(--fons); font-weight: 700; }
.nx-pi-salut { background: #FDEBDD; color: #8A2F0A; }
.nx-pi-restr { background: #FDECEA; color: #8F1D14; display: flex; gap: 6px; align-items: flex-start; }
.nx-panell-peu { margin: 0 16px 16px; width: auto !important; }
@media (max-width: 900px) { .nx-ll-grup h1 { font-size: 24px; } .nx-ll-grups { width: min(420px, calc(100vw - 24px)); } .nx-ll .nx-graella { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); } }
@media (max-width: 560px) { .nx-ll .nx-graella { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } .nx-ll .nx-cel { --foto: 58px; } .nx-ll-eines .btn { flex: 1; } }
@media (min-width: 901px) { .nx-main .nx-cerca:not(.nx-top-cerca) { display: none; } }
@media (max-width: 560px) { .nx-ll-estat { display: none; } .nx-ll-eines .btn { white-space: nowrap; padding: 0 10px; } .nx-ll-cnt .nx-pil { padding: 4px 8px; } .nx-ll-cnt .nx-pil b { font-size: 16px; } }
@media (min-width: 901px) { .nx-shell .nx-barra { left: var(--side-w); } html.nx-plegat .nx-shell .nx-barra { left: var(--side-plegat); } .nx-ll-eines { flex-wrap: nowrap; } .nx-ll-eines .nx-ll-filtres { flex-wrap: nowrap; } }
.nx-ll-lot:not([hidden]) ~ .nx-ll-estat { display: none; }

/* ---------- Passar llista: eines segons la pantalla (decisió 02/12) ---------- */
.nx-ll-eines-v2 { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "cap cnt" "filt acc"; gap: 10px 12px; align-items: center; flex-shrink: 0; }
.nx-ll-eines-v2 > .a-cap { grid-area: cap; } .nx-ll-eines-v2 > .a-cnt { grid-area: cnt; justify-content: flex-end; }
.nx-ll-eines-v2 > .a-filt { grid-area: filt; gap: 8px; flex-wrap: nowrap; min-width: 0; } .nx-ll-eines-v2 > .a-acc { grid-area: acc; gap: 8px; flex-wrap: nowrap; justify-content: flex-end; }
.nx-ll-eines-v2 .nx-ll-fila { min-height: 40px; }
.nx-ll-eines-v2 .nx-ll-filtres { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.nx-ll-eines-v2 .nx-ll-filtres::-webkit-scrollbar { display: none; }
.nx-ll-eines-v2 .nx-fc { flex-shrink: 0; }
/* Tauleta horitzontal i portàtils petits: menú plegat a icones */
@media (min-width: 901px) and (max-width: 1279px) {
  .nx-side { width: var(--side-plegat); }
  .nx-side .nx-side-txt, .nx-side .nx-side-tag, .nx-side .nx-side-ext, .nx-side-sec, .nx-side-plega { display: none; }
  .nx-side-a { justify-content: center; padding: 0; }
  .nx-side-logo { justify-content: center; padding: 0; }
  .nx-shell .nx-barra { left: var(--side-plegat) !important; }
}
/* Tauleta vertical: tres files (classe/sessió/dia · recompte i botons · filtres), tota la classe a la vista */
@media (max-width: 1099px) {
  .nx-ll-eines-v2 { grid-template-areas: "cap cap" "cnt acc" "filt filt"; }
  .nx-ll-eines-v2 > .a-cnt { justify-content: flex-start; }
}
@media (min-width: 700px) and (max-width: 900px) and (min-height: 700px) {
  .nx-main-plena:has(.nx-ll) { padding-top: 12px; padding-bottom: 14px; }
  .nx-ll { height: calc(100dvh - var(--top-h) - 26px); }
}
/* Mòbil: capçalera compacta, filtres lliscants, botons fixos a baix i fitxa ràpida com a full inferior */
@media (max-width: 699px) {
  .nx-ll-eines-v2 { grid-template-columns: minmax(0, 1fr); grid-template-areas: "cap" "cnt" "filt"; gap: 8px; }
  .nx-ll-eines-v2 > .a-cap { gap: 8px; }
  .nx-ll-eines-v2 .nx-ll-filtres { margin: 0 -12px; padding: 0 12px; }
  .nx-ll-eines-v2 > .a-acc { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; background: #fff; border-top: 1px solid var(--line-2); box-shadow: 0 -6px 18px rgba(15,23,42,.06); padding: 10px 12px calc(12px + env(safe-area-inset-bottom, 0)); }
  .nx-ll-eines-v2 > .a-acc .btn { flex: 1; height: 50px; min-height: 50px; font-size: 15px; }
  .nx-ll-eines-v2 > .a-acc .btn-primary { flex: 1.4; }
  .nx-ll-eines-v2 > .a-acc .nx-ll-estat { display: none; }
  .nx-main-plena:has(.nx-ll) { padding-bottom: 96px; }
  .nx-ll .nx-ll-mat { display: none; }
  .nx-ll-dia { margin-left: auto; }
  .nx-toast { bottom: 92px; }
  .nx-panell { top: auto; left: 0; width: 100%; max-height: 82dvh; border-radius: 20px 20px 0 0; box-shadow: 0 -12px 32px rgba(15,23,42,.18); }
  .nx-panell::before { content: ""; display: block; width: 40px; height: 5px; border-radius: 3px; background: #C9D2DC; margin: 8px auto 0; }
}
/* Cercador al mòbil: botó a la capçalera que obre el camp */
.nx-top-cerca-btn { display: none; }
@media (max-width: 900px) {
  .nx-top-cerca-btn { display: inline-flex; }
  .nx-top.cerca-oberta .nx-top-cerca { display: block; position: absolute; left: 8px; right: 8px; top: 8px; max-width: none; margin: 0; z-index: 5; }
  .nx-top.cerca-oberta .nx-top-cerca-camp { background: #fff; height: 40px; box-shadow: 0 6px 20px rgba(15,23,42,.15); }
}
@media (max-width: 699px) { .nx-crumbs { display: none; } .nx-top .nx-top-grow { display: block; flex: 1; } }
.nx-top-grow { display: none; }

/* =========================================================================
   v2 · Igualar totes les pantalles del personal (només .nx-body: l'app de famílies no canvia)
   ========================================================================= */
.nx-body .nx-main .stack { gap: 14px; }
.nx-body .nx-main h1 { font-size: 26px; font-weight: 900; line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
.nx-body .nx-main .kicker { font-size: 11px; font-weight: 800; letter-spacing: .08em; color: #6B7580; margin: 0 0 2px; }
.nx-body .nx-main .lead { font-size: 15px; }
.nx-body .card { border: 1px solid var(--line-2); border-radius: 14px; padding: 16px; box-shadow: none; }
.nx-body .h-card { font-size: 16px; }
.nx-body .sec-title { font-size: 16px; margin-top: 4px; }
.nx-body .btn { min-height: 40px; padding: 0 16px; border-radius: 10px; font-size: 14px; border-width: 1.5px; }
.nx-body .btn-lg { min-height: 48px; font-size: 15px; }
.nx-body .btn-sm { min-height: 34px; padding: 0 12px; font-size: 13px; }
.nx-body .btn-outline { border-color: #C9D2DC; color: var(--ink); }
.nx-body .btn-outline:hover { border-color: var(--blue); color: var(--blue); }
.nx-body .flash { border-radius: 10px; padding: 10px 14px; font-size: 14px; }
.nx-body .nx-main input:not([type=checkbox]):not([type=radio]):not([type=file]), .nx-body .nx-main select, .nx-body .nx-main textarea { border-radius: 10px; border-color: #C9D2DC; }
.nx-body .nx-main input:not([type=checkbox]):not([type=radio]):not([type=file]), .nx-body .nx-main select { min-height: 40px; }
/* Seccions d'un mòdul (Gestió, Menjador): una barra segmentada, com les sessions de la llista */
.nx-body .subnav { display: flex; flex-wrap: wrap; gap: 2px; padding: 3px; border: 0; border-radius: 12px; background: #E6EBF0; width: fit-content; max-width: 100%; }
.nx-body .subnav a { min-height: 34px; height: 34px; padding: 0 13px; border: 0; border-radius: 9px; background: transparent; color: var(--mut-2); font-size: 13px; font-weight: 800; }
.nx-body .subnav a:hover { color: var(--ink); background: transparent; }
.nx-body .subnav a.is-on { background: #fff; color: var(--blue); box-shadow: 0 1px 3px rgba(15,23,42,.15); }
.nx-body .subnav.subnav-sm { background: transparent; padding: 0; gap: 6px; }
.nx-body .subnav.subnav-sm a { border: 1.5px solid var(--line-2); background: #fff; border-radius: 999px; }
.nx-body .subnav.subnav-sm a.is-on { background: var(--ink); border-color: var(--ink); color: #fff; box-shadow: none; }
/* Pestanyes d'elements (perfils, torns, classes): com els filtres */
.nx-body .nx-tabs { gap: 6px; }
.nx-body .nx-tabs a { min-height: 36px; height: 36px; padding: 0 12px; border: 1.5px solid var(--line-2); font-size: 13px; }
.nx-body .nx-tabs a.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
/* El camí de dalt ja fa de «tornar»: l'enllaç enrere només al mòbil */
@media (min-width: 700px) { .nx-body .nx-main a.back { display: none; } }
/* Taules */
.nx-body .nx-taula th { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #6B7580; }
/* Capçalera de pàgina: títol a l'esquerra, accions a la dreta (mateixa alçada que a la llista) */
.nx-pcap { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-height: 44px; }
.nx-pcap > .grow { min-width: 0; }
.nx-pcap .meta { margin-top: 2px; font-size: 13px; }
/* Menjador · llista del dia (mateix patró) */
.nx-mj .subnav { flex-shrink: 0; }
.nx-mj .a-cap h1 { font-size: 26px; }
.nx-menj-v2 { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; padding-bottom: 8px; }
.nx-menj-gcap { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.nx-menj-gcap b { font-size: 16px; font-weight: 900; }
.nx-menj-gcap .nx-fc { margin-left: auto; height: 32px; }
.nx-menj-v2 .nx-graella { grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 10px; }
.nx-mj .nx-cel { min-height: 150px; --foto: 64px; }
.nx-mj .nx-cel.nx-m-present { background: #E4F4EA; border: 2px solid #2F855A; }
.nx-mj .nx-cel.nx-m-present .nx-etq { background: #2F855A; color: #fff; }
.nx-mj .nx-cel.nx-m-absent { background: #FFF1E6; border: 2px solid #C2410C; }
.nx-mj .nx-cel.nx-m-absent .nx-etq { background: #C2410C; color: #fff; }
.nx-mj .nx-cel.nx-m-absent img { filter: grayscale(1); opacity: .45; }
.nx-mj .nx-cel .nx-etq:empty { display: none; }
.nx-mj .nx-xip { font-size: 10px; }
.nx-mj-menu { max-width: 360px; overflow: hidden; }
.nx-mj-menu span { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 699px) { .nx-menj-v2 { overflow: visible; } .nx-mj .a-acc .nx-ll-estat { display: inline; } }
.nx-body .nx-pcap select, .nx-body .nx-pcap input { width: auto; }
@media (max-width: 699px) { .nx-mj-menu { display: none; } }
/* Taules amples: scroll dins la targeta, no la pàgina */
.nx-body .nx-wrap { overflow-x: auto; }

/* v2.4 — drets d'imatge i recollidors */
.nx-x-img { background: #B42318; color: #fff; }
.nx-x-imgx { background: #FEF0C7; color: #93370D; }
.nx-recs { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.nx-rec { border: 1px solid var(--line, #E4E7EC); border-radius: 12px; padding: 8px 10px; background: #fff; }
.nx-rec[open] { grid-column: 1 / -1; }
.nx-rec > summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; }
.nx-rec > summary::-webkit-details-marker { display: none; }
.nx-rec > summary img, .nx-rec > summary .nx-ini { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none; }
.nx-rec > summary .nx-ini { display: grid; place-items: center; background: #EEF2F6; font-weight: 700; }
.nx-pi-recs { display: grid; gap: 6px; }
.nx-pi-rec { display: flex; align-items: center; gap: 8px; }
.nx-pi-rec img, .nx-pi-rec .nx-ini { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: none; display: grid; place-items: center; background: #EEF2F6; font-weight: 700; font-size: 13px; }
.nx-rec > summary .grow { line-height: 1.35; }
input[type=tel], input[type=email], input[type=time], input[type=search] { width: 100%; min-height: 46px; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--white); font-size: 16px; }
/* v2.6 — agrupaments */
.nx-agr-grups { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px 18px; }
.nx-agr-col { display: flex; flex-direction: column; gap: 2px; }
.nx-agr-col .nx-row { border-bottom: 1px solid var(--line, #E4E7EC); padding-bottom: 4px; margin-bottom: 4px; }
.nx-agr-fr td, .nx-agr-fr th { text-align: center; padding: 4px 6px; }
.nx-agr-tag { display: inline-block; margin-top: 2px; padding: 1px 6px; border-radius: 6px; background: #EEF4FF; color: #1D4ED8; font-weight: 700; text-decoration: none; }
/* v2.7 — llistes d'agrupament */
.nx-x-agr { background: #EEF4FF; color: #1D4ED8; font-weight: 800; padding: 0 6px; }
.nx-cel.nx-fora { opacity: .55; }
.nx-cel.nx-fora .nx-tap { cursor: not-allowed; }
.nx-ll-repartida { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; margin-bottom: 8px; border-radius: 12px; background: #EEF4FF; color: #1E3A8A; font-weight: 700; }
.nx-ara { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 16px; background: var(--brand, #0B5E7E); color: #fff; text-decoration: none; }
.nx-ara:hover { filter: brightness(1.05); }
.nx-ara .nx-ara-h { font-size: 28px; font-weight: 900; line-height: 1; }
.nx-ara .grow b { display: block; font-size: 20px; }
.nx-ara .grow span { opacity: .9; font-size: 14px; }
.nx-ara .btn { background: #fff; color: var(--brand, #0B5E7E); border: 0; }
.nx-fr.nx-fr-rep { background: #EEF4FF; color: #1D4ED8; border-style: dashed; }
