/* Brúixola · Escola Paidos (base visual de Reconnecta't) */
:root {
  --blue: #005A84; --blue-d: #003F5E; --sky: #E3EEF4;
  --ink: #1F2A33; --mut: #56616B; --line: #E4E0D8; --bg: #F6F4EF; --white: #FFFFFF;
  --yel: #F7B83B; --mag: #D1006F; --grn: #45A688; --grn-d: #2B7A5F;
  --ora: #EE8A00; --ora-d: #A85600; --vio: #6675B4; --vio-d: #4A5796;
  --ok-bg: #DDF1E8; --warn-bg: #FCEBD6; --mag-bg: #FBE3EE;
  --r-lg: 18px; --r-md: 14px; --r-sm: 10px;
  --nav-h: 72px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif; background: var(--bg); color: var(--ink); font-size: 16px; line-height: 1.5; }
img { max-width: 100%; display: block; }
h1 { margin: 0; font-size: 26px; font-weight: 900; line-height: 1.15; }
h2 { margin: 0; }
p { margin: 0; }
a { color: var(--blue); }
a:hover { color: var(--blue-d); }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--yel); outline-offset: 2px; }
[hidden] { display: none !important; }
.vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- Estructura ---------- */
.app { max-width: 560px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); }
.app-wide { max-width: 1180px; }
.appbar { position: sticky; top: 0; z-index: 20; height: 64px; padding: 0 16px; padding-top: env(safe-area-inset-top, 0); background: var(--white); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.appbar-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--blue); }
.appbar-logo img { height: 36px; width: auto; max-width: 130px; object-fit: contain; }
.brand { font-weight: 900; font-size: 18px; }
.main { flex: 1; padding: 20px 16px 32px; }
.main.has-nav { padding-bottom: calc(var(--nav-h) + 28px + env(safe-area-inset-bottom, 0)); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 600px) { .grid-3 { grid-template-columns: 1fr; } }
.center { text-align: center; }
.muted { color: var(--mut); }
.label { font-size: 13px; font-weight: 700; color: var(--mut); }
.hint { font-size: 13px; color: var(--mut); }
.page-head { display: flex; flex-direction: column; gap: 6px; }
.meta { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; color: var(--mut); }
.meta.sm { font-size: 13px; gap: 6px; }
.back { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; text-decoration: none; min-height: 32px; }
.c-blue { color: var(--blue); } .c-grn { color: var(--grn-d); } .c-vio { color: var(--vio-d); } .c-mag { color: var(--mag); } .c-ora { color: var(--ora-d); }

/* Colors d'etapa */
.dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; background: var(--blue); }
.et-inf { background: var(--yel); } .et-ini { background: var(--ora); } .et-mit { background: var(--grn); }
.et-sup { background: var(--vio); } .et-eso { background: var(--mag); }

/* ---------- Components ---------- */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; }
.h-card { font-size: 18px; font-weight: 900; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 12px; border: 2px solid transparent; font-size: 16px; font-weight: 800; text-decoration: none; cursor: pointer; background: none; }
.btn-lg { min-height: 56px; font-size: 17px; border-radius: var(--r-md); }
.btn-block { width: 100%; }
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-d); color: var(--white); }
.btn-primary[disabled] { background: #C3CBD1; color: #3F4A53; cursor: progress; }
.btn-outline { border-color: var(--blue); color: var(--blue); background: var(--white); }
.btn-outline:focus-within { outline: 3px solid var(--yel); outline-offset: 2px; }
.btn-white { background: var(--white); color: var(--blue); }
.link-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0; border: none; background: none; color: var(--mut); font-size: 13px; font-weight: 800; cursor: pointer; }
.link-strong { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; text-decoration: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 3px 12px; font-size: 13px; font-weight: 800; white-space: nowrap; }
.chip.sm { font-size: 11px; padding: 1px 8px; }
.chip-yel { background: var(--yel); color: var(--ink); }
.chip-sky { background: var(--sky); color: var(--blue); }
.chip-line { background: var(--white); border: 1px solid var(--line); color: var(--mut); }
.chip-ok { background: var(--ok-bg); color: var(--grn-d); }
.chip-warn { background: var(--warn-bg); color: var(--ora-d); }
.chip-mag { background: var(--mag-bg); color: var(--mag); }
.chip-blue { background: var(--blue); color: var(--white); }
.chip-glass { background: rgba(255,255,255,.16); color: var(--white); font-weight: 700; }
.pill { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--white); color: var(--ink); font-size: 14px; font-weight: 800; text-decoration: none; }
.pill.is-on { background: var(--blue); border-color: var(--blue); color: var(--white); }
.flash { border-radius: var(--r-md); padding: 12px 14px; font-weight: 700; margin-bottom: 16px; }
.flash ul { margin: 0; padding-left: 18px; }
.flash-ok { background: var(--ok-bg); color: var(--grn-d); }
.flash-error { background: var(--mag-bg); color: #9C0053; }
.flash-info { background: var(--sky); color: var(--blue); }
.flash.is-hiding { opacity: 0; transform: translateY(-6px); max-height: 0; padding-top: 0; padding-bottom: 0; margin-bottom: 0; overflow: hidden;
  transition: opacity .4s ease, transform .4s ease, max-height .4s ease .3s, padding .4s ease .3s, margin .4s ease .3s; }
@media (prefers-reduced-motion: reduce) { .flash.is-hiding { transition: none; } }
.stars-txt { color: var(--ora-d); font-size: 15px; letter-spacing: 1px; }
.empty-card p, .empty p { color: var(--mut); }
.empty { align-items: flex-start; padding-top: 40px; }

/* Formularis */
.field { display: flex; flex-direction: column; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > label, .field > legend, .field-label, .stars legend { font-size: 14px; font-weight: 800; padding: 0; }
input[type=text], input[type=number], input[type=date], input[type=url], textarea, select { width: 100%; min-height: 46px; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--white); font-size: 16px; }
textarea { resize: vertical; background: var(--bg); line-height: 1.5; }
input:focus, textarea:focus, select:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px var(--sky); }
.accept { display: flex; gap: 12px; align-items: flex-start; background: var(--sky); border-radius: var(--r-md); padding: 14px; }
.accept input { width: 24px; height: 24px; margin: 0; flex-shrink: 0; accent-color: var(--blue); }
.accept label { font-size: 15px; font-weight: 700; line-height: 1.4; }
.form-error { color: #9C0053; font-weight: 800; font-size: 14px; }

/* ---------- Bottom nav ---------- */
.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; margin: 0 auto; transform: translate3d(0, 0, 0); -webkit-backface-visibility: hidden; backface-visibility: hidden; width: 100%; max-width: 560px; z-index: 30; height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0)); padding-bottom: env(safe-area-inset-bottom, 0); background: var(--white); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.bottom-nav.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.app-wide .bottom-nav { max-width: 1180px; }
.bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-decoration: none; color: var(--mut); font-size: 12px; font-weight: 700; border-top: 3px solid transparent; }
.bottom-nav a.is-on { color: var(--blue); font-weight: 900; border-top-color: var(--blue); }

/* Menú d'usuari */
.menu { position: relative; }
.menu summary { list-style: none; display: flex; align-items: center; gap: 10px; cursor: pointer; min-height: 44px; }
.menu summary::-webkit-details-marker { display: none; }
.lang-pill { font-size: 12px; font-weight: 800; color: var(--blue); border: 1.5px solid var(--blue); border-radius: 999px; padding: 3px 9px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--blue); color: var(--white); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; }
.menu-panel { position: absolute; right: 0; top: calc(100% + 8px); width: 280px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 12px 32px rgba(31,42,51,.14); }
.menu-name span { font-size: 13px; color: var(--mut); word-break: break-all; }
.menu-label { font-size: 13px; font-weight: 800; color: var(--mut); }
.menu-langs { display: flex; flex-wrap: wrap; gap: 6px; }
.menu-langs .pill { min-height: 38px; padding: 0 12px; font-size: 13px; }

/* ---------- Login ---------- */
.login-body { background: var(--white); min-height: 100dvh; display: flex; flex-direction: column; }
.login { flex: 1; width: 100%; max-width: 420px; margin: 0 auto; padding: 32px 28px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; }
.login-logo { width: auto; height: auto; max-width: 240px; max-height: 140px; object-fit: contain; }
.login-title { text-align: center; display: flex; flex-direction: column; gap: 8px; }
.login-title h1 { font-size: 46px; color: var(--blue); line-height: 1; }
.kicker { font-size: 13px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: var(--mut); }
.lead { font-size: 17px; color: var(--mut); line-height: 1.45; }
.login-note { font-size: 13px; color: var(--mut); text-align: center; }
.login-langs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.brand-strip { display: flex; height: 10px; }
.brand-strip span { flex: 1; }
.brand-strip span:nth-child(1) { background: var(--blue); } .brand-strip span:nth-child(2) { background: var(--yel); }
.brand-strip span:nth-child(3) { background: var(--mag); } .brand-strip span:nth-child(4) { background: var(--grn); }
.brand-strip span:nth-child(5) { background: var(--ora); } .brand-strip span:nth-child(6) { background: var(--vio); }

/* ---------- Normes ---------- */
.normes { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 12px; font-size: 15px; }

/* ---------- Inici ---------- */
.score { display: flex; flex-direction: column; gap: 12px; }
.score-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.score-row > div { display: flex; flex-direction: column; }
.score-row .right { align-items: flex-end; }
.big { font-size: 44px; font-weight: 900; color: var(--blue); line-height: 1; }
.mid { font-size: 26px; font-weight: 900; }
.progress { height: 12px; background: #EDEAE3; border-radius: 999px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--grn); border-radius: 999px; }
.hero { background: var(--blue); border-color: var(--blue); color: var(--white); display: flex; flex-direction: column; gap: 12px; padding: 20px; }
.hero .kicker { color: var(--yel); }
.hero h2 { font-size: 23px; font-weight: 900; line-height: 1.2; }
.row-link { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); }
.row-link .muted { font-size: 14px; }
.sq { width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.sq-yel { background: var(--yel); color: var(--ink); }
.stat { background: var(--bg); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; }
.stat-n { font-size: 26px; font-weight: 900; }

/* ---------- Llista de reptes ---------- */
.segmented { display: grid; gap: 4px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); padding: 4px; }
.segmented.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.segmented.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.segmented a { min-height: 44px; display: flex; align-items: center; justify-content: center; border-radius: var(--r-sm); font-size: 15px; font-weight: 800; color: var(--ink); text-decoration: none; }
.segmented a.is-on { background: var(--blue); color: var(--white); }
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.list-item { display: flex; align-items: center; gap: 14px; padding: 14px; text-decoration: none; color: var(--ink); }
.list-item:hover { border-color: var(--blue); color: var(--ink); }
.month { width: 56px; height: 56px; border-radius: var(--r-md); flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 900; letter-spacing: .04em; }
.m-now { background: var(--blue); color: var(--white); }
.m-past { background: var(--vio-d); color: var(--white); }
.m-extra { background: var(--yel); color: var(--ink); }
.item-title { font-size: 16px; line-height: 1.25; }
.pts { font-size: 13px; font-weight: 700; color: var(--blue); }
.status { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }

/* ---------- Detall ---------- */
.media { border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 16 / 9; background: var(--blue); }
.media iframe { width: 100%; height: 100%; border: 0; display: block; }
.media-link { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--white); text-decoration: none; font-weight: 800; }
.media-link:hover { color: var(--white); }
.play { width: 64px; height: 64px; border-radius: 50%; background: rgba(255,255,255,.18); display: flex; align-items: center; justify-content: center; }
.desc { font-size: 16px; line-height: 1.6; }
.quote { background: var(--bg); border-radius: 12px; padding: 12px; font-size: 15px; }
.done-head { display: flex; align-items: center; justify-content: space-between; }
.notice { font-weight: 700; }
.notice-mag { background: var(--mag-bg); border-color: var(--mag-bg); color: #9C0053; }
.picker { display: flex; flex-direction: column; gap: 10px; }
.slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.slot { aspect-ratio: 1 / 1; border-radius: var(--r-md); position: relative; overflow: hidden; }
.slot-empty { border: 2px dashed #B9C3CA; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--mut); font-size: 12px; font-weight: 700; }
.slot-full { background: #CFE3EC; }
.slot-full img { width: 100%; height: 100%; object-fit: cover; }
.slot-full a { display: block; height: 100%; }
.slot-x { position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; border-radius: 50%; border: none; background: var(--white); color: var(--ink); display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.slot form { margin: 0; }

/* Estrelles (radio accessibles, sense JavaScript) */
.stars { border: 0; padding: 0; margin: 0; }
.stars legend { margin-bottom: 6px; }
.stars-row { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 6px; }
.stars-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.stars-row label { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; color: #CBD2D8; cursor: pointer; border-radius: 10px; }
.stars-row input:checked ~ label, .stars-row label:hover, .stars-row label:hover ~ label { color: var(--ora); }
.stars-row input:focus-visible + label { outline: 3px solid var(--yel); }

/* Galeria */
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 900px) { .app-wide .gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.g-card { background: var(--white); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; }
.g-img { position: relative; display: block; aspect-ratio: 4 / 3; background: #CFE3EC; }
.g-img img { width: 100%; height: 100%; object-fit: cover; }
.g-count { position: absolute; right: 8px; bottom: 8px; background: rgba(31,42,51,.8); color: var(--white); border-radius: 999px; padding: 1px 8px; font-size: 12px; font-weight: 800; }
.g-body { padding: 10px; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.g-body form { margin: 0; }

/* ---------- Rànquing ---------- */
.private { background: var(--sky); border-color: var(--sky); display: flex; align-items: center; gap: 14px; }
.private > span:last-child { display: flex; flex-direction: column; }
.pos { width: 52px; height: 52px; flex-shrink: 0; border-radius: 50%; background: var(--blue); color: var(--white); display: flex; align-items: center; justify-content: center; font-size: 19px; font-weight: 900; }
.rank { gap: 8px; }
.rank-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: var(--r-md); }
.rank-row.is-mine { border: 2px solid var(--blue); background: #F0F6F9; }
.rank-n { width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%; background: #EDEAE3; display: flex; align-items: center; justify-content: center; font-weight: 900; }
.rank-n.first { background: var(--yel); }
.rank-cls { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.rank-pts { display: flex; flex-direction: column; align-items: flex-end; }
.rank-pts strong { font-size: 18px; color: var(--blue); }
.rank-pts .label { font-size: 11px; }

/* ---------- Suggeriments ---------- */
.sug-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.sug-text { font-weight: 700; }
.reply { background: var(--bg); border-radius: 12px; padding: 12px; display: flex; gap: 10px; font-size: 14px; }

/* ---------- Administració ---------- */
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 900px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi { display: flex; flex-direction: column; gap: 2px; }
.kpi-n { font-size: 34px; font-weight: 900; line-height: 1.1; }
.table-wrap { overflow-x: auto; margin-top: 8px; }
.table { width: 100%; border-collapse: collapse; min-width: 640px; }
.table th { text-align: left; font-size: 12px; font-weight: 900; color: var(--mut); padding: 10px 12px; border-bottom: 1px solid var(--line); }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 14px; }
.radio-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-pills input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.radio-pills span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1.5px solid var(--line); font-weight: 800; font-size: 14px; cursor: pointer; background: var(--white); }
.radio-pills input:checked + span { background: var(--blue); border-color: var(--blue); color: var(--white); }
.radio-pills input:focus-visible + span { outline: 3px solid var(--yel); outline-offset: 2px; }
.lang-blocks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 900px) { .lang-blocks { grid-template-columns: 1fr; } }
.lang-block { border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; margin: 0; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.lang-block legend { font-weight: 900; padding: 0 6px; color: var(--blue); }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }

/* ---------- Gestió: pestanyes, permisos i normes ---------- */
.subnav { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.subnav a { min-height: 40px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 999px; text-decoration: none; font-weight: 800; font-size: 14px; color: var(--ink); background: var(--white); border: 1.5px solid var(--line); }
.subnav a.is-on { background: var(--blue); border-color: var(--blue); color: var(--white); }
.segmented.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 600px) { .segmented.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
a.kpi-link { text-decoration: none; color: var(--ink); }
a.kpi-link:hover { border-color: var(--blue); }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 14px; }
.check { width: 22px; height: 22px; accent-color: var(--blue); }
.actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.actions form { margin: 0; }
.search { display: flex; gap: 8px; flex-wrap: wrap; }
.search input[type=search] { flex: 1; min-width: 220px; min-height: 46px; border: 1.5px solid var(--line); border-radius: 12px; padding: 0 12px; background: var(--white); }
.field-inline { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 800; }
.field-inline select { min-height: 44px; width: auto; }
.form-actions-left { justify-content: flex-start; align-items: center; }
.norm-list { list-style: decimal; margin: 0; padding-left: 22px; display: flex; flex-direction: column; }
.norm-item { padding: 12px 0; border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: flex-start; }
.norm-item:last-child { border-bottom: none; }
.norm-item .grow { gap: 6px; }
.norm-item .chip { align-self: flex-start; }
.norm-item.is-off p { color: var(--mut); text-decoration: line-through; }
.norm-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.norm-actions form { margin: 0; }
.icon-btn { width: 40px; height: 40px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--white); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; color: var(--ink); }
.icon-btn[disabled] { opacity: .35; cursor: default; }
.icon-btn.c-mag { color: var(--mag); }

/* ---------- Fases 2 i 3: moderació, informes, curs ---------- */
.btn-danger { background: var(--mag); color: var(--white); }
.btn-danger:hover { background: #A80059; color: var(--white); }
.mod-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.mod-thumb { width: 96px; height: 96px; border-radius: 10px; overflow: hidden; background: #CFE3EC; display: block; }
.mod-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mod-thumbs.sm .mod-thumb { width: 44px; height: 44px; border-radius: 6px; margin-top: 6px; }
.mod-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.mod-actions form { margin: 0; }
.mod-retirar { display: flex; gap: 8px; flex: 1; min-width: 260px; }
.mod-retirar input { flex: 1; min-height: 38px; }
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.filters label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 800; color: var(--mut); min-width: 160px; flex: 1; }
.filters select, .filters input { min-height: 42px; }
.bars { display: flex; flex-direction: column; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 140px minmax(0, 1fr) 48px; align-items: center; gap: 12px; font-size: 14px; }
.bar-label { font-weight: 800; }
.bar { height: 16px; background: #EDEAE3; border-radius: 999px; overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: 999px; }
.bar-inline { display: inline-block; width: 90px; height: 10px; vertical-align: middle; }
.bar-row strong { text-align: right; }
.bar .et-def { background: var(--blue); }

.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 16px; min-width: 360px; }
.perm { display: flex; align-items: flex-start; gap: 6px; font-size: 13px; font-weight: 700; line-height: 1.3; white-space: normal; cursor: pointer; }
.perm .check { flex-shrink: 0; margin-top: 1px; }

.pdf-card { border-color: var(--blue); }
.pdf-opts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- Banner d'instal·lació (PWA) ---------- */
.install { display: flex; align-items: center; gap: 12px; background: var(--white); border: 1.5px solid var(--blue); border-radius: var(--r-lg); padding: 12px 14px; margin-bottom: 16px; }
.install[hidden] { display: none; }
.install img { border-radius: 10px; flex-shrink: 0; }
.install-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13px; color: var(--mut); line-height: 1.4; }
.install-txt strong { font-size: 15px; color: var(--ink); }
.install-txt svg { vertical-align: -3px; color: var(--blue); }
.install-x { width: 36px; height: 36px; border: 0; background: none; font-size: 24px; color: var(--mut); cursor: pointer; flex-shrink: 0; }
.login .install { width: 100%; margin: 0; text-align: left; }
@media (display-mode: standalone) { .appbar { padding-top: env(safe-area-inset-top, 0); height: calc(64px + env(safe-area-inset-top, 0)); } }

/* ---------- Propostes amb IA ---------- */
.ia-card summary { cursor: pointer; font-weight: 900; font-size: 17px; display: flex; align-items: center; gap: 10px; min-height: 32px; }
.ia-card[open] summary { margin-bottom: 14px; }
.ia-badge { background: var(--vio-d); color: var(--white); border-radius: 8px; padding: 2px 8px; font-size: 13px; }
.ia-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-top: 14px; }
.ia-results:empty { display: none; }
.ia-prop { border: 1.5px solid var(--line); border-radius: var(--r-md); padding: 14px; display: flex; flex-direction: column; gap: 8px; background: var(--white); }
.ia-prop-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.ia-prop h3 { margin: 0; font-size: 16px; font-weight: 900; line-height: 1.3; }
.ia-prop p { margin: 0; font-size: 14px; line-height: 1.5; }
.ia-meta { color: var(--vio-d); }
.ia-prop .btn { align-self: flex-start; margin-top: auto; }

.danger-zone { border-color: var(--mag-bg); }

.et-per { background: var(--ink); }
.rank-row.is-staff { background: #F3F1EC; }
.sel-sm { min-height: 36px; width: auto; padding: 4px 8px; font-size: 13px; font-weight: 700; }

.m-equip { background: var(--ink); color: var(--white); }
.chip-ink { background: var(--ink); color: var(--white); }
.sq-ink { background: var(--ink); color: var(--white); }

/* ---------- Cicles ---------- */
.cicle-title { display: flex; align-items: center; gap: 10px; }
.regla { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.regla form { margin: 0; }
.regla-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0; }
.regla-form input[type=text] { flex: 1; min-width: 200px; min-height: 40px; }
.ou-list { display: flex; flex-wrap: wrap; gap: 6px; max-height: 260px; overflow-y: auto; }
.ou-chip { border: 1.5px solid var(--line); background: var(--white); border-radius: 8px; padding: 6px 10px; font: 600 13px/1.2 ui-monospace, monospace; cursor: pointer; }
.ou-chip:hover { border-color: var(--blue); }
.color-pills span { width: 40px; height: 40px; padding: 0; border-radius: 50%; }
.color-pills input:checked + span { outline: 3px solid var(--ink); outline-offset: 2px; }

.bulk-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; position: sticky; top: 72px; z-index: 5; border-color: var(--blue); }
.bulk-bar select { width: auto; min-height: 40px; }

.docents-cicle summary { cursor: pointer; font-weight: 800; color: var(--blue); min-height: 32px; display: flex; align-items: center; }
.docents-cicle[open] summary { margin-bottom: 8px; }
.docents-llista { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 16px; max-height: 320px; overflow-y: auto; padding: 4px; }

.ou-tree { display: flex; flex-direction: column; gap: 4px; max-height: 60vh; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px; }
.ou-node { white-space: normal; min-height: 32px; }
.ou-node code { font-size: 12px; }
.sync-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 0; }

/* ---------- Avatars ---------- */
.avatar-svg { display: block; border-radius: 50%; flex-shrink: 0; }
.avatar-img { background: none; padding: 0; overflow: hidden; }
.hello { flex-direction: row; align-items: center; gap: 14px; }
.hello-av { flex-shrink: 0; border-radius: 50%; }
.sq-av { background: var(--sky); color: var(--ora); }
.g-who { display: flex; align-items: center; gap: 8px; }
.av-top { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.av-count { font-size: 18px; }
.av-count strong { font-size: 32px; font-weight: 900; color: var(--blue); }
.av-cat { margin: 0; }
.av-cat legend { padding: 0 6px; }
.av-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 10px; margin-top: 8px; }
.av-colors { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); }
.av-opt { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; border: 2px solid var(--line); border-radius: var(--r-md); cursor: pointer; text-align: center; background: var(--white); }
.av-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.av-opt:has(input:checked) { border-color: var(--blue); background: var(--sky); }
.av-opt:has(input:focus-visible) { outline: 3px solid var(--yel); outline-offset: 2px; }
.av-opt.is-locked { cursor: not-allowed; }
.av-opt.is-locked .av-th { opacity: .35; }
.av-opt.is-locked .av-name { color: var(--muted); }
.av-sw { width: 40px; height: 40px; border-radius: 50%; border: 2px solid rgba(0,0,0,.08); }
.av-name { font-size: 12px; font-weight: 800; line-height: 1.2; }
.av-lock { font-size: 11px; font-weight: 800; color: var(--ora-d); }

.ou-row { display: grid; grid-template-columns: 34px 34px 1fr; align-items: center; gap: 6px; min-height: 32px; }
.ou-head { font-size: 12px; font-weight: 800; color: var(--muted); padding: 0 10px; }
.chip-warn { background: #FDF0D2; color: var(--ora-d); }

.classe-al { margin: 4px 0 4px 8px; }
.classe-al summary { cursor: pointer; font-weight: 700; font-size: 14px; }
.al-llista { columns: 2 220px; margin: 6px 0 8px 18px; font-size: 14px; }
.kpis-title { margin: 6px 0 -4px; }
.mini-bar { display: inline-block; width: 70px; height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; vertical-align: middle; }
.mini-bar span { display: block; height: 100%; background: var(--grn); }
.kpi-total { border: 2px solid var(--vio); }
.mini-bar.mini-doc span { background: var(--blue); }

.btn-trad { margin: 2px 0 8px; gap: 6px; }
.btn-trad .ia-badge { font-size: 10px; }
.lang-block.is-traduit { animation: traduit 1.6s ease; }
@keyframes traduit { 0% { background: #DDF1E8; } 100% { background: transparent; } }
.lang-block.is-corregit { animation: corregit 2.4s ease; }
@keyframes corregit { 0% { background: #FDF0D2; } 100% { background: transparent; } }

/* ---------- Versió de demostració ---------- */
.demo-banner { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--yel); color: var(--ink); padding: 6px 14px; font-size: 13px; }
.demo-banner a { font-weight: 900; color: var(--ink); }
.demo-login { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.demo-login form { margin: 0; }
.demo-tag { align-self: center; background: var(--yel); border-radius: 999px; padding: 3px 12px; font-weight: 900; font-size: 13px; margin: 0; }
.demo-btn { flex-direction: column; align-items: center; gap: 2px; padding-top: 10px; padding-bottom: 10px; }
.demo-btn small { font-size: 12px; font-weight: 700; opacity: .85; }
.opinio form { width: 100%; text-align: left; }

/* ---------- Aparença ---------- */
.marca-preview { display: flex; gap: 24px; flex-wrap: wrap; }
.marca-box { margin-top: 6px; border: 1.5px dashed var(--line); border-radius: var(--r-md); padding: 14px; background: var(--white); display: flex; align-items: center; gap: 10px; min-height: 70px; }
.marca-box img { max-width: 240px; max-height: 120px; object-fit: contain; }
.marca-bar img { height: 36px; max-width: 130px; }
.marca-bar strong { color: var(--blue); font-weight: 900; font-size: 18px; }

/* ===================== Brúixola ===================== */
.brand-sub { font-size: 13px; font-weight: 700; color: var(--mut); }
@media (max-width: 640px) { .brand-sub { display: none; } }
.appbar { gap: 16px; }
.topnav { display: flex; gap: 4px; margin-right: auto; margin-left: 16px; }
.topnav a { min-height: 44px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: var(--r-sm); text-decoration: none; color: var(--ink); font-weight: 700; }
.topnav a.is-on { background: var(--sky); color: var(--blue); font-weight: 800; }
.main { padding: 24px 24px 48px; }
.hero-b { background: var(--blue); color: var(--white); border-radius: var(--r-lg); padding: 24px 28px; }
.hero-b p { color: var(--sky); }
.kicker-b { font-size: 13px; font-weight: 800; letter-spacing: .05em; color: var(--yel); }
.notice-b { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; border-left: 5px solid var(--yel); }
.sec-title { font-size: 18px; font-weight: 900; }
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.class-card { display: flex; flex-direction: column; gap: 6px; }
.class-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.class-head strong { font-size: 18px; font-weight: 900; }
.class-head .chip { margin-left: auto; }
.dot-et { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; flex-shrink: 0; }
.area-name { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.sq-area { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; }
.kpis-b { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.kpi-b { display: flex; flex-direction: column; gap: 2px; }
.kpi-b strong { font-size: 30px; font-weight: 900; }
.c-warn { color: var(--ora-d); }
.c-ok { color: var(--grn-d); }
.small { font-size: 12px; font-weight: 800; }
.passos { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.passos li.fet { color: var(--grn-d); }
.passos li.fet::marker { content: '✓  '; font-weight: 900; }
.row-btns { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.split { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.split > form, .split > div { flex: 999 1 560px; min-width: 0; }
.side-list { flex: 1 1 220px; padding: 8px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 80px; max-height: calc(100dvh - 100px); overflow-y: auto; }
.side-list a { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 10px; border-radius: var(--r-sm); text-decoration: none; color: var(--ink); font-weight: 700; }
.side-list a:hover { background: var(--bg); }
.side-list a.is-on { background: var(--sky); color: var(--blue); }
.side-et { font-size: 12px; font-weight: 900; color: var(--mut); text-transform: uppercase; letter-spacing: .05em; padding: 10px 10px 2px; }
.sel-row { display: flex; flex-wrap: wrap; gap: 8px; }
.sel-col { display: flex; flex-direction: column; gap: 6px; }
.sel-docent { min-height: 40px; min-width: 210px; border-radius: var(--r-sm); border: 1px solid var(--line); padding: 0 10px; background: var(--white); font-weight: 700; }
.sel-docent.is-buit { color: var(--mut); border-style: dashed; font-weight: 600; }
.subnav-sm { border-bottom: 0; padding-bottom: 0; }
.inp-num { width: 70px; }
.table input[type=text], .table input[type=number] { min-height: 38px; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 0 10px; }
.table input[type=color] { width: 44px; height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 2px; vertical-align: middle; }
.area-prev { display: inline-block; padding: 2px 10px; border-radius: 6px; font-weight: 900; font-size: 13px; vertical-align: middle; }
.table tr.is-off td { opacity: .55; }
.table tr.is-err td { background: #FFF5F7; }
.row-nova td { background: var(--bg); }
.login-marca { display: flex; justify-content: center; margin-bottom: 4px; }
.field { display: flex; flex-direction: column; gap: 4px; font-weight: 800; font-size: 14px; }
.sel-sm { min-height: 38px; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 0 8px; background: var(--white); font-weight: 700; }
.table td .perm-grid { margin-top: 8px; }
.empty-card { display: flex; flex-direction: column; gap: 4px; }
code { background: var(--bg); border-radius: 4px; padding: 0 4px; font-size: .92em; }
.grid-det { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; align-items: start; }
.det-box { border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 14px; }
.det-box summary { cursor: pointer; min-height: 32px; }
.table-mini { min-width: 0; }
.table-mini td { padding: 6px 8px; font-size: 13px; }
.table-mini td.num { text-align: right; font-weight: 800; }
.ou-tree-b { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.ou-row-b { display: grid; grid-template-columns: minmax(0, 1fr) 230px 170px; align-items: center; gap: 10px; padding: 6px 12px; border-bottom: 1px solid var(--line); }
.ou-row-b:last-child { border-bottom: 0; }
.ou-row-b.te-regla { background: var(--sky); }
.ou-nom { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ou-row-b .chip { justify-self: start; }
@media (max-width: 760px) { .ou-row-b { grid-template-columns: 1fr; } }
/* Usuaris i permisos: taula compacta que cap sense desplaçament lateral */
.taula-usuaris { min-width: 860px; table-layout: fixed; }
.taula-usuaris td { vertical-align: top; padding: 10px 8px; }
.taula-usuaris .col-chk { width: 44px; }
.taula-usuaris .col-nom { width: 24%; }
.taula-usuaris .col-rol { width: 170px; }
.taula-usuaris .col-acc { width: 92px; }
.taula-usuaris td:first-child { padding-top: 14px; }
.taula-usuaris td strong { overflow-wrap: anywhere; }
.taula-usuaris .hint { overflow-wrap: anywhere; }
.taula-usuaris select.sel-sm { width: 100%; min-height: 36px; }
.perm-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.perm-chips.coord { margin-top: 8px; align-items: center; }
.perm-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 10px 0 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.perm-chip input { width: 16px; height: 16px; margin: 0; accent-color: var(--blue); }
.perm-chip:has(input:checked) { background: var(--sky); border-color: var(--blue); color: var(--blue); }
.perm-chip:focus-within { outline: 3px solid var(--yel); outline-offset: 1px; }
.perm-cad { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 12px; font-weight: 800; color: var(--mut); flex-wrap: wrap; }
.perm-cad input { min-height: 32px; width: 150px; padding: 0 6px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; }
.perm-cad span { font-weight: 600; }
.acc-col { display: flex; flex-direction: column; align-items: stretch; gap: 4px; }
.acc-col form { margin: 0; }
.acc-col .btn { width: 100%; justify-content: center; }
.acc-col .link-btn { min-height: 30px; width: 100%; justify-content: center; }

/* ---------- Setmana 2: àrees, graella i observacions ---------- */
.hero-b { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.dates-b { display: flex; gap: 10px; flex-wrap: wrap; }
.date-b { background: rgba(255,255,255,.12); border-radius: var(--r-md); padding: 10px 14px; min-width: 130px; display: flex; flex-direction: column; }
.date-b span { font-size: 12px; font-weight: 700; color: var(--sky); }
.date-b strong { font-size: 20px; font-weight: 900; }
.date-b.is-yel { background: var(--yel); color: var(--ink); }
.date-b.is-yel span { color: var(--ink); }
.prog-b { display: flex; flex-direction: column; gap: 4px; }
.prog-txt { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; }
.prog-bar { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.prog-bar div { height: 8px; background: var(--grn); border-radius: 4px; }
.card-links { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.card-links a { min-height: 36px; display: inline-flex; align-items: center; padding: 0 12px; border-radius: var(--r-sm); background: var(--sky); color: var(--blue); font-weight: 800; font-size: 14px; text-decoration: none; }
.card-links a:hover { background: var(--blue); color: var(--white); }

.area-cap { display: flex; flex-direction: column; gap: 12px; }
.back-b { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; font-size: 14px; text-decoration: none; }
.area-cap-band { background: var(--ac); color: var(--act); border-radius: var(--r-lg); padding: 18px 22px; display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.area-cap-band h1 { font-size: 24px; }
.area-cap-band span { font-weight: 700; opacity: .9; }
.trim-sel select { min-height: 42px; border-radius: var(--r-sm); border: 0; padding: 0 12px; font-weight: 800; background: var(--white); color: var(--ink); }

.taula-asp { min-width: 560px; }
.taula-asp .c-ord, .taula-asp .c-pes { width: 90px; }
.taula-asp .c-acc { width: 110px; }
.inp-full { width: 100%; }
.c-mag-t { color: #9C0053; }
.empty-note { color: var(--mut); font-weight: 700; }
.grid-2-wide { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.field input[type=text], .field input[type=number], .field input[type=date], .field textarea, .field select { min-height: 42px; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 6px 10px; font-weight: 600; }
.legend-b { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 12px 16px; }

.graella-wrap { padding: 0; overflow: auto; max-height: calc(100dvh - 220px); }
.graella { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 14px; }
.graella th, .graella td { border-bottom: 1px solid var(--line); padding: 6px 8px; text-align: center; background: var(--white); }
.graella thead th { position: sticky; top: 0; z-index: 2; font-size: 12px; font-weight: 900; color: var(--ink); border-bottom: 1.5px solid var(--ink); vertical-align: bottom; }
.graella .g-al { text-align: left; position: sticky; left: 0; z-index: 1; min-width: 190px; font-weight: 800; }
.graella thead .g-al { z-index: 3; color: var(--mut); }
.graella .g-asp { min-width: 110px; max-width: 160px; }
.graella .g-asp span { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.graella .g-act { min-width: 140px; background: var(--bg); }
.graella .g-sug, .graella .g-fin { background: #F2F7FA; }
.graella td.g-sug { font-size: 13px; font-weight: 800; color: var(--mut); }
.graella td.g-sug span { display: inline-block; border-radius: 999px; padding: 3px 10px; }
.g-sel { min-height: 36px; min-width: 70px; border-radius: 999px; border: 1.5px solid var(--line); padding: 0 8px; font-weight: 900; font-size: 13px; background: var(--white); text-align: center; cursor: pointer; }
.g-sel-act { min-width: 130px; font-weight: 800; }
.g-sel:disabled { cursor: not-allowed; opacity: .7; }
.g-omple { display: block; margin: 6px auto 0; min-height: 28px; font-size: 11px; font-weight: 700; border: 1px dashed var(--line); border-radius: 8px; background: var(--white); color: var(--mut); }
.g-mod { display: block; font-size: 11px; font-weight: 800; color: var(--ora-d); }
.graella tr.is-bloc th, .graella tr.is-bloc td { background: #FAF9F6; }
.sticky-actions { position: sticky; bottom: 12px; z-index: 4; }
.sticky-actions .btn { box-shadow: 0 8px 24px rgba(31,42,51,.18); }

.obs-card { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; }
.obs-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.obs-card textarea { width: 100%; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; font-size: 15px; line-height: 1.5; resize: vertical; }
.banc { flex: 1 1 300px; position: sticky; top: 80px; max-height: calc(100dvh - 100px); overflow-y: auto; }
.banc-item { border-bottom: 1px solid var(--line); padding: 8px 0; display: flex; flex-direction: column; gap: 4px; }
.banc-txt { text-align: left; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg); padding: 8px 10px; font-size: 14px; line-height: 1.4; cursor: pointer; }
.banc-txt:hover:not(:disabled) { border-color: var(--blue); background: var(--sky); }
.banc-meta { display: flex; align-items: center; gap: 8px; }
.banc-meta form { margin-left: auto; }
.banc-nou { border-top: 1px solid var(--line); padding-top: 10px; }
.banc-nou textarea { width: 100%; }

.trim-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.trim-card.is-obert { border: 2px solid var(--grn); }
.trim-card.is-tancat { opacity: .75; }
.field-row { flex-direction: row; justify-content: space-between; align-items: center; gap: 10px; font-weight: 700; font-size: 13px; }
.field-row input { width: 160px; }

/* ---------- Setmana 3: tutoria, fitxa, seguiment i IA ---------- */
.chip-violet { background: #E8EAF5; color: #4A5796; }
.btn-ia { background: #6675B4; color: #FFFFFF; border-color: #6675B4; }
.btn-ia:hover { background: #4A5796; border-color: #4A5796; color: #FFFFFF; }
.btn-ia[aria-busy="true"] { opacity: .7; cursor: progress; }
.al-cel { display: flex; align-items: center; gap: 10px; }
.thumb { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; flex-shrink: 0; border: 2px solid var(--blue); }
.thumb-buit { display: inline-flex; align-items: center; justify-content: center; background: var(--sky); color: var(--blue); font-weight: 900; font-size: 13px; border-style: dashed; }
.fitxa-cap { display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-start; }
.foto-box { width: 160px; height: 160px; border-radius: 20px; border: 5px solid var(--blue); background: var(--sky); overflow: hidden; display: flex; align-items: center; justify-content: center; text-align: center; color: var(--blue); font-weight: 800; font-size: 13px; padding: 8px; flex-shrink: 0; }
.foto-box img { width: 100%; height: 100%; object-fit: cover; margin: -8px; width: calc(100% + 16px); height: calc(100% + 16px); }
.fitxa-nom { font-size: 26px; font-weight: 900; }
.stepper-b { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.stepper-b li { padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 800; border: 1px solid var(--line); color: var(--mut); background: var(--white); }
.stepper-b li.fet { background: #DDF1E8; color: #2B7A5F; border-color: #DDF1E8; }
.stepper-b li.ara { background: var(--blue); color: var(--white); border-color: var(--blue); }
.retorn summary { list-style: none; }
.retorn summary::-webkit-details-marker { display: none; }
.retorn[open] { flex-basis: 100%; }
.retorn form { margin-top: 8px; max-width: 520px; }
.arees-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.area-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; border-color: var(--ac); }
.area-card-cap { background: var(--ac); color: var(--act); padding: 10px 14px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.asp-llista { list-style: none; margin: 0; padding: 6px 14px; }
.asp-llista li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.area-obs { margin: 0; padding: 8px 14px; font-size: 14px; line-height: 1.5; }
.area-card > .hint { padding: 0 14px 12px; }
.barra-estats { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--line); }
.fitxa-cap textarea, form[data-ia-general] textarea { width: 100%; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; font-size: 15px; line-height: 1.5; }
form[data-ia-general] input[data-ia-ind] { min-height: 40px; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 0 12px; }
.taula-tut td { vertical-align: top; }
.tut-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tut-csv { min-width: 200px; font-size: 13px; font-weight: 700; color: var(--mut); }

/* ---------- Setmana 3b: formularis i pàgines públiques ---------- */
.pub-body { background: var(--bg); min-height: 100dvh; }
.pub-cap { background: var(--white); border-bottom: 1px solid var(--line); padding: 10px 20px; display: flex; justify-content: center; }
.pub-main { max-width: 720px; margin: 0 auto; padding: 20px 16px 48px; }
.pub-hero { background: var(--blue); color: var(--white); border-radius: var(--r-lg); padding: 20px 22px; display: flex; flex-direction: column; gap: 6px; }
.pub-hero h1 { font-size: 24px; line-height: 1.2; }
.pub-hero p { color: var(--sky); }
.pub-msg { text-align: center; padding: 32px 24px; }
.form-dim { border: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.form-dim legend { font-size: 18px; font-weight: 900; padding: 0 6px; }
.pas { display: inline-block; background: var(--sky); color: var(--blue); border-radius: 999px; padding: 1px 10px; font-size: 12px; font-weight: 900; margin-right: 6px; vertical-align: middle; }
.preg { padding: 10px 0; border-bottom: 1px solid var(--line); }
.preg:last-child { border-bottom: 0; }
.preg-text { margin: 0 0 8px; font-weight: 700; font-size: 16px; }
.escala-b { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.op-b { position: relative; }
.op-b input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.op-b span { display: flex; align-items: center; justify-content: center; min-height: 46px; border: 1.5px solid var(--line); border-radius: 12px; font-weight: 800; font-size: 14px; background: var(--white); text-align: center; padding: 0 4px; }
.op-b input:checked + span { background: var(--blue); border-color: var(--blue); color: var(--white); }
.op-b input:focus-visible + span { outline: 3px solid var(--yel); outline-offset: 2px; }
.op-b input:disabled + span { opacity: .6; }
.form-dim textarea { width: 100%; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; font-size: 15px; }
.taula-form td { vertical-align: top; }
.fam-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 3px 0; }
.afegeix-c summary { list-style: none; cursor: pointer; }
.afegeix-c summary::-webkit-details-marker { display: none; }
.afegeix-c form { margin-top: 6px; }
.enllac-classe input[readonly] { min-height: 40px; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 0 10px; background: var(--bg); font-size: 13px; flex: 1 1 320px; }
.missatge-model { background: var(--bg); border-radius: var(--r-sm); padding: 12px 14px; font-size: 14px; line-height: 1.5; margin: 8px 0 0; }
.inp-dim { min-height: 40px; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 0 10px; font-size: 17px; font-weight: 900; flex: 1 1 280px; }
.taula-preg { min-width: 820px; }
.taula-preg .c-ord { width: 80px; } .taula-preg .c-et { width: 190px; } .taula-preg .c-dim { width: 190px; } .taula-preg .c-chk { width: 64px; text-align: center; } .taula-preg .c-acc { width: 90px; }
.taula-preg td { vertical-align: top; }
.taula-preg input[type=checkbox] { display: block; margin: 8px auto 0; }

/* ---------- Graella compacta: el màxim d'alumnes a la pantalla ---------- */
.main:has(.graella-form) { padding-top: 12px; padding-bottom: 12px; }
.main:has(.graella-form) > .stack { gap: 10px; }
.area-cap.compacte { gap: 8px; }
.area-cap.compacte .back-b { display: none; }
.area-cap.compacte .area-cap-band { padding: 8px 14px; border-radius: var(--r-md); }
.area-cap.compacte .area-cap-band h1 { font-size: 18px; }
.area-cap.compacte .area-cap-band span { font-size: 13px; }
.area-cap.compacte .trim-sel select { min-height: 34px; }
.area-cap.compacte .subnav { padding-bottom: 0; }
.area-cap.compacte .subnav a { min-height: 34px; padding: 0 12px; font-size: 14px; }
.graella-form { display: flex; flex-direction: column; gap: 8px; }
.g-barra { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); padding: 6px 8px 6px 12px; position: sticky; top: 64px; z-index: 6; }
.g-llegenda { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.g-ll { border-radius: 999px; padding: 2px 9px; font-size: 12px; font-weight: 900; cursor: help; }
.g-info { position: relative; }
.g-info summary { list-style: none; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--line); display: inline-flex; align-items: center; justify-content: center; font-weight: 900; color: var(--mut); cursor: pointer; }
.g-info summary::-webkit-details-marker { display: none; }
.g-info-txt { position: absolute; top: 32px; left: 0; z-index: 20; width: min(440px, 80vw); background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: 0 10px 30px rgba(31,42,51,.15); padding: 12px 14px; font-size: 13px; line-height: 1.5; }
.g-compte { margin-left: auto; font-size: 13px; font-weight: 800; color: var(--mut); }
.graella-wrap { max-height: calc(100dvh - 200px); border-radius: var(--r-md); }
.graella { font-size: 13px; }
.graella th, .graella td { padding: 2px 5px; }
.graella thead th { padding: 6px 5px; font-size: 11.5px; line-height: 1.25; }
.graella tbody tr:nth-child(even) th, .graella tbody tr:nth-child(even) td { background: #FBFAF7; }
.graella tbody tr:hover th, .graella tbody tr:hover td { background: #F2F7FA; }
.graella .g-al { min-width: 0; width: 210px; max-width: 210px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 700; font-size: 13px; }
.graella .g-asp { min-width: 84px; max-width: 130px; }
.graella .g-asp span { -webkit-line-clamp: 2; }
.graella .g-act { min-width: 118px; }
.g-sel { min-height: 28px; height: 28px; min-width: 58px; padding: 0 4px; font-size: 12.5px; border-width: 1.5px; }
.g-sel-act { min-width: 112px; font-size: 12px; }
.g-omple { margin-top: 4px; min-height: 24px; font-size: 10.5px; }
.graella td.g-sug { font-size: 12px; }
.graella td.g-sug span { padding: 2px 8px; }
.g-mod { display: inline; margin-left: 4px; font-size: 10px; }
@media (max-width: 760px) { .g-barra { top: 0; } .graella .g-al { width: 150px; max-width: 150px; } }
.taula-esc { min-width: 900px; }
.taula-esc td { vertical-align: top; }
.taula-esc .c-ord { width: 72px; } .taula-esc .c-codi { width: 86px; } .taula-esc .c-num { width: 84px; } .taula-esc .c-col { width: 100px; }
.taula-esc .c-prev { width: 220px; } .taula-esc .c-chk { width: 56px; text-align: center; } .taula-esc .c-acc { width: 90px; }
.taula-esc input[type=checkbox] { display: block; margin: 8px auto 0; }
.colors { display: flex; gap: 6px; }
.colors input[type=color], .afegeix-niv input[type=color] { width: 40px; height: 36px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); cursor: pointer; }
.subnav-sm a { min-height: 36px; font-size: 14px; }
tr.is-off td { opacity: .55; }
.filtres-reg { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.filtres-reg .field { flex: 1 1 160px; }
.taula-reg { min-width: 900px; }
.taula-reg td { vertical-align: top; }
.taula-reg .c-data { width: 130px; } .taula-reg .c-usu { width: 170px; } .taula-reg .c-acc { width: 170px; } .taula-reg .c-ip { width: 110px; }
.pagina-b { justify-content: center; margin-top: 10px; }
.banner-historic { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: var(--yel); color: var(--ink); border-radius: var(--r-md); padding: 10px 14px; margin-bottom: 14px; font-weight: 700; }
.banner-historic .btn { background: var(--ink); color: var(--white); }
.lot-assig summary { cursor: pointer; list-style: none; }
.lot-assig summary::-webkit-details-marker { display: none; }
.lot-assig form { margin-top: 12px; }
.lot-grups { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- Camí 1: activitats ---------- */
.nova-act { align-items: flex-end; }
.graella-act .g-grup-asp { background: var(--sky); color: var(--blue); font-size: 12px; text-align: center; border-left: 2px solid var(--white); }
.graella-act thead tr:nth-child(2) th { top: 30px; }
.graella-act .g-act-col { min-width: 74px; max-width: 110px; }
.act-nom { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.act-meta { display: block; font-weight: 700; color: var(--mut); font-size: 10.5px; }
.graella-act .g-calc { min-width: 92px; background: #F2F7FA; }
.graella-act td.g-calc span { display: inline-block; border-radius: 999px; padding: 2px 8px; font-size: 12px; font-weight: 800; color: var(--mut); }
.graella-act .dif { font-style: normal; font-weight: 900; color: var(--ora-d); margin-left: 4px; cursor: help; }
.nota-in { width: 56px; height: 28px; text-align: center; border: 1.5px solid var(--line); border-radius: 8px; font-weight: 800; font-size: 13px; background: var(--white); }
.nota-in:focus { border-color: var(--blue); outline: 2px solid var(--yel); outline-offset: 0; }
.nota-in:disabled { opacity: .6; }
.g-amb-act { display: inline-block; margin-top: 2px; font-size: 10px; font-weight: 800; color: var(--blue); background: var(--sky); border-radius: 999px; padding: 0 6px; text-decoration: none; }
.pub-cap { align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pub-idiomes { display: flex; gap: 4px; }
.pub-idiomes a { min-height: 36px; display: inline-flex; align-items: center; padding: 0 10px; border-radius: 999px; font-size: 13px; font-weight: 800; text-decoration: none; color: var(--mut); }
.pub-idiomes a.is-on { background: var(--sky); color: var(--blue); }
.taula-tr { min-width: 760px; } .taula-tr td { vertical-align: top; } .taula-tr td:first-child { width: 34%; }
.taula-tr input.is-buit { border-color: var(--yel); background: #FFFBEF; }
.sel-xs { min-height: 28px; font-size: 12px; font-weight: 800; border: 1px solid var(--line); border-radius: 8px; padding: 0 4px; background: var(--white); }
.idioma-c { display: inline; }
.llista-exp { list-style: none; margin: 0; padding: 0; } .llista-exp li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.bloc-model { display: flex; flex-direction: column; gap: 8px; padding: 12px 16px; }
.bloc-cap { display: flex; align-items: center; gap: 10px; }
.titols-bloc .field, .opcions-bloc .field { flex: 1 1 180px; }
.opcions-bloc { align-items: flex-end; }
.asp-prop { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.asp-prop-a { border-left: 5px solid var(--ac); background: var(--bg); border-radius: var(--r-sm); padding: 8px 12px; }
.asp-prop-a ul { margin: 4px 0 0; padding-left: 18px; font-size: 13px; }
.filtre-etapa { display: flex; flex-wrap: wrap; gap: 6px; }
.filtre-etapa a { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--white); font-weight: 800; font-size: 14px; text-decoration: none; color: var(--ink); }
.filtre-etapa a span { background: var(--bg); border-radius: 999px; padding: 0 8px; font-size: 12px; color: var(--mut); }
.filtre-etapa a.is-on { background: var(--blue); border-color: var(--blue); color: var(--white); }
.filtre-etapa a.is-on span { background: rgba(255,255,255,.2); color: var(--white); }
.bloc-pos { width: 30px; height: 30px; border-radius: 50%; background: var(--sky); color: var(--blue); font-weight: 900; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.bloc-mou { display: inline-flex; flex-direction: column; }
.bloc-mou .link-btn { min-height: 18px; padding: 0 4px; font-size: 11px; line-height: 1; }
.bloc-mou .link-btn:disabled { opacity: .25; cursor: default; }
.mou-ordre { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }

/* ---------- Quadre de comandament ---------- */
.filtres-q { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.filtres-q .field { flex: 1 1 180px; }
.q-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.q-kpi { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.q-kpi strong { display: block; font-size: 15px; line-height: 1.25; }
.q-anell { width: 76px; height: 76px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.q-anell span { width: 58px; height: 58px; border-radius: 50%; background: var(--white); display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 18px; }
.q-xifres { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.q-xifres .card { display: flex; flex-direction: column; gap: 4px; padding: 12px 16px; }
.q-xifres strong { font-size: 26px; font-weight: 900; }
.q-xifres small { font-size: 14px; color: var(--mut); }
.q-cap { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.q-llegenda { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12px; font-weight: 800; color: var(--mut); align-items: center; }
.q-llegenda i, .q-ll i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.q-taula { display: flex; flex-direction: column; }
.q-fila { display: grid; grid-template-columns: minmax(150px, 1.1fr) 2.4fr 1fr 1.2fr; gap: 12px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); }
.q-res .q-fila { grid-template-columns: minmax(150px, 1fr) 3.4fr 56px; }
.q-cap-fila { font-size: 11px; font-weight: 900; color: var(--mut); text-transform: uppercase; letter-spacing: .04em; border-bottom: 1.5px solid var(--ink); }
.qb-barra { display: flex; height: 22px; border-radius: 6px; overflow: hidden; background: var(--line); }
.qb-barra div { display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 900; white-space: nowrap; overflow: hidden; }
.qb-barra.buida { align-items: center; padding-left: 8px; font-size: 11px; color: var(--mut); background: repeating-linear-gradient(45deg, #EEE 0 6px, #F7F7F7 6px 12px); }
.q-prog { display: flex; align-items: center; gap: 8px; }
.q-prog .prog-bar { flex: 1; }
.q-prog span { font-weight: 900; font-size: 13px; width: 40px; text-align: right; }
.q-form { display: flex; align-items: center; gap: 4px; }
.q-form span { width: 18px; height: 18px; border-radius: 50%; display: inline-block; }
.q-form small { margin-left: 6px; font-weight: 800; color: var(--mut); font-size: 12px; }
.q-mitj { font-weight: 900; font-size: 15px; text-align: right; }
.q-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }
.q-donut-b { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.q-donut { width: 170px; height: 170px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.q-donut span { width: 104px; height: 104px; border-radius: 50%; background: var(--white); display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 26px; font-weight: 900; }
.q-donut small { font-size: 12px; font-weight: 700; color: var(--mut); }
.q-ll { list-style: none; margin: 0; padding: 0; flex: 1 1 200px; }
.q-ll li { display: flex; align-items: center; gap: 6px; padding: 4px 0; font-size: 14px; font-weight: 700; }
.q-ll b { margin-left: auto; font-weight: 900; }
.q-ll .hint { width: 40px; text-align: right; }
.q-doc summary { list-style: none; cursor: pointer; grid-template-columns: minmax(150px, 1.2fr) 2fr 1fr; }
.q-doc summary::-webkit-details-marker { display: none; }
.q-doc-det { padding: 6px 0 10px; font-size: 13px; color: var(--mut); }
.q-doc-det p { margin: 2px 0; }
@media (max-width: 760px) { .q-fila, .q-res .q-fila, .q-doc summary { grid-template-columns: 1fr; gap: 4px; } }
.arees-fila { grid-template-columns: minmax(140px, 1fr) 1.4fr 1.4fr 1fr; }
.inline-f { display: inline; }
.avisos-card { border: 2px solid var(--yel); background: #FFFBEF; }
.avis-item { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 8px 10px; border-radius: var(--r-sm); background: var(--white); text-decoration: none; color: var(--ink); font-weight: 700; border: 1px solid var(--line); }
.avis-item:hover { border-color: var(--blue); }
.g-pct { display: block; font-size: 10px; font-weight: 800; color: var(--mut); }
.pct-in { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; }
.fila-actitud td { background: #FBFAF7; }
.fila-total td { border-top: 1.5px solid var(--ink); font-size: 15px; }
.correu-prev { margin-top: 6px; padding: 10px; background: var(--bg); border-radius: var(--r-sm); font-size: 13px; line-height: 1.45; max-width: 520px; }
.q-sub { font-size: 14px; font-weight: 900; margin: 10px 0 0; display: flex; align-items: center; gap: 6px; }
.q-ll-al, .q-ll-cl { display: inline-block; width: 16px; height: 10px; border-radius: 3px; background: var(--blue); }
.q-ll-cl { background: #C9C4BA; }
.q-comp { grid-template-columns: minmax(150px, 1fr) 3fr 56px; }
.q-duo { display: flex; flex-direction: column; gap: 3px; }
.q-duo > div { height: 16px; border-radius: 0 6px 6px 0; display: flex; align-items: center; justify-content: flex-end; min-width: 34px; }
.q-duo span { font-size: 11px; font-weight: 900; padding: 0 6px; color: #fff; }
.q-bar-cl { background: #C9C4BA; }
.q-bar-cl span { color: var(--ink) !important; }
.q-niv { display: flex; gap: 4px; flex-wrap: wrap; font-size: 13px !important; }
.q-niv span { border-radius: 999px; padding: 2px 8px; }
.q-dims { grid-template-columns: minmax(150px, 1fr) 1fr 1fr 1fr; }
.q-dim { display: grid; grid-template-columns: 52px 1fr 30px; align-items: center; gap: 6px; }
.q-dim b { font-size: 13px; text-align: right; }
.q-rev h3 { font-size: 14px; font-weight: 900; margin: 0 0 6px; }
.q-rev-baix h3 { color: #9C0053; } .q-rev-alt h3 { color: #2B7A5F; }
.q-rev-it { display: flex; flex-direction: column; padding: 6px 10px; border-radius: var(--r-sm); border: 1px solid var(--line); margin-bottom: 4px; text-decoration: none; color: var(--ink); }
.q-rev-it:hover { border-color: var(--blue); }
.pct-in .inp-num { width: 88px; text-align: right; padding-right: 8px; font-variant-numeric: tabular-nums; }
.d-block { display: block; }
.actitud-card { border: 2px solid var(--sky); align-items: center; } .pct-gran { font-size: 16px; font-weight: 900; gap: 8px; }
.q-pista { align-self: center; }
.curs-titol { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 900; margin: 14px 0 6px; padding-bottom: 6px; border-bottom: 1.5px solid var(--line); }
.ia-alumne { flex-wrap: wrap; } .ia-ind-al { flex: 1 1 280px; min-height: 36px; border: 1px dashed #B9BFE0; border-radius: var(--r-sm); padding: 0 10px; font-size: 13px; background: #FAFAFE; }
.q-ia { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.q-ia-out { background: #F5F6FC; border: 1px solid #DCE0F2; border-radius: var(--r-md); padding: 12px 16px; font-size: 14px; line-height: 1.55; }
.q-ia-out h4 { margin: 10px 0 4px; font-size: 14px; font-weight: 900; color: #4A5796; }
.q-ia-out ul { margin: 0; padding-left: 20px; }
.table tr.is-meva td { background: #FFFBEF; } .table tr.is-meva td:first-child { box-shadow: inset 4px 0 0 var(--yel); }
.demo-perfil { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; border: 2px dashed var(--vio, #6675B4); background: #F5F6FC; } .demo-botons { display: flex; gap: 6px; flex-wrap: wrap; }
.demo-sel { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.demo-sel > span { font-size: 12px; font-weight: 800; color: var(--sky); text-transform: uppercase; letter-spacing: .05em; }
.demo-seg { display: inline-flex; background: rgba(255,255,255,.14); border-radius: 999px; padding: 3px; gap: 2px; }
.demo-seg button { border: 0; background: transparent; color: var(--white); font: inherit; font-weight: 800; font-size: 14px; padding: 7px 14px; border-radius: 999px; cursor: pointer; min-height: 36px; }
.demo-seg button.is-on { background: var(--white); color: var(--blue); }
.demo-seg button:not(.is-on):hover { background: rgba(255,255,255,.18); }
.demo-seg button:focus-visible { outline: 3px solid var(--yel); outline-offset: 1px; }
.g-pct-in { display: inline-flex; align-items: center; gap: 2px; margin-top: 3px; font-size: 10.5px; font-weight: 800; color: var(--mut); }
.g-pct-in input { width: 44px; height: 22px; text-align: right; border: 1px solid var(--line); border-radius: 6px; font-size: 11px; font-weight: 800; padding: 0 4px; }
.act-pcts { display: flex; flex-wrap: wrap; gap: 3px; justify-content: center; margin-top: 3px; }
.act-pct { display: inline-flex; align-items: center; gap: 2px; font-size: 10.5px; font-weight: 900; color: var(--blue); background: var(--sky); border-radius: 6px; padding: 1px 4px; }
.act-pct input { width: 38px; height: 20px; text-align: right; border: 1px solid #C5DCE8; border-radius: 5px; font-size: 11px; font-weight: 800; padding: 0 3px; }
.omple-col { display: flex; gap: 3px; justify-content: center; align-items: center; margin-top: 4px; }
.omple-col input { width: 44px; height: 22px; border: 1px dashed var(--line); border-radius: 6px; font-size: 11px; text-align: center; }
.omple-col .link-btn { font-size: 10.5px; min-height: 22px; padding: 0 2px; }
.filtre-comps { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.fc-chip { display: inline-flex; }
.fc-chip input { position: absolute; opacity: 0; }
.fc-chip span { border: 1.5px solid var(--line); border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 900; cursor: pointer; color: var(--mut); }
.fc-chip input:checked + span { background: var(--blue); border-color: var(--blue); color: var(--white); }
.fc-chip input:focus-visible + span { outline: 3px solid var(--yel); }
.nota-in.de-ia { background: #EEF0FB; border-color: #6675B4; }
.eines-notes summary { cursor: pointer; }
.eines-notes textarea { width: 100%; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px; font-family: inherit; }
.edita-act { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 0; border-bottom: 1px solid var(--line); }
.graella-act thead tr th { top: 0; }
.c-num { color: var(--blue); font-weight: 900; } th[hidden], td[hidden] { display: none; }
.filtre-gran { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 14px; } .filtre-gran .fc-chip span { font-size: 13px; padding: 4px 12px; }

/* Caselles petites dins de les graelles (sobreescriu l'estil general dels camps) */
.graella input[type=text] { min-height: 0; padding: 0 4px; border-radius: 6px; font-size: 12px; }
.graella input[type=text].nota-in { width: 56px; height: 28px; font-size: 13px; font-weight: 800; text-align: center; border: 1.5px solid var(--line); border-radius: 8px; }
.graella .act-pct input[type=text] { width: 40px; height: 20px; text-align: right; font-weight: 800; font-size: 11px; border: 1px solid #C5DCE8; }
.graella .omple-col input[type=text] { width: 44px; height: 22px; text-align: center; border: 1px dashed var(--line); font-size: 11px; }
.graella .g-pct-in input[type=text] { width: 44px; height: 22px; text-align: right; font-weight: 800; font-size: 11px; }
.graella-act .g-act-col { min-width: 82px; max-width: 130px; }
.sep-v { width: 1px; height: 24px; background: var(--line); margin: 0 6px; } .sel-xs { width: auto; min-height: 30px !important; padding: 2px 8px !important; font-size: 13px !important; border-radius: 8px !important; }
.foto-mini { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; display: inline-flex; align-items: center; justify-content: center; }
.foto-perfil { width: 110px; height: 110px; border-radius: 18px; object-fit: cover; display: inline-flex; align-items: center; justify-content: center; }
.inicials { background: var(--sky); color: var(--blue); font-weight: 900; }
.foto-perfil.inicials { font-size: 34px; }
.chip-mag { background: #FBE7F1; color: #9C0053; }
.agenda-reu { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.agenda-dia { border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.agenda-dia.is-avui { border: 2px solid var(--yel); }
.agenda-cap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; background: var(--bg); font-size: 14px; }
.agenda-slot { display: flex; align-items: center; gap: 8px; padding: 5px 12px; border-top: 1px solid var(--line); min-height: 36px; font-size: 13px; }
.agenda-hora { width: 44px; font-weight: 900; color: var(--mut); flex-shrink: 0; }
.agenda-slot.is-ocupat { background: #EEF5FA; }
.agenda-slot.is-feta { background: #E4F3EE; }
.agenda-al { font-weight: 800; color: var(--blue); flex: 1; }
.agenda-lliure { flex: 1; gap: 4px; }
.agenda-lliure select { flex: 1; }
.eines-reunio { background: #FFFFFF; color: #005A84; font-weight: 800; padding: 6px 12px; border-radius: 8px; text-decoration: none; }
.opcio-franja { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--r-sm); font-weight: 700; cursor: pointer; }
.opcio-franja input { width: 20px; height: 20px; }
.reu-llista { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.reu-it { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); text-decoration: none; color: var(--ink); font-weight: 700; font-size: 14px; }
.reu-it.is-avui { border: 2px solid var(--yel); background: #FFFBEF; }
.reu-it:hover { border-color: var(--blue); }
.agenda-slot.is-proposta { background: repeating-linear-gradient(45deg, #FFFBEF 0 8px, #FFF4D6 8px 16px); }
.fila-avis td { background: #FDEFF5; }
.num-llista { display: inline-flex; width: 30px; height: 30px; align-items: center; justify-content: center; border-radius: 50%; background: var(--sky); color: var(--blue); font-weight: 900; }

/* ---------- Requadres de filtres: fons propi perquè s'identifiquin d'un cop d'ull ---------- */
.filtres-q, .filtres-reg, .filters, .filtre-gran {
  background: #EAF4F8;
  border: 1px solid #C9E1EC;
  border-left: 5px solid var(--blue);
}
.filtres-q .field, .filtres-reg .field, .filters .field { color: var(--blue); font-weight: 800; }
.filtres-q select, .filtres-q input[type=search], .filtres-q input[type=text],
.filtres-reg select, .filtres-reg input, .filters select, .filters input { background: #FFFFFF; }
.filtre-gran .fc-chip span { background: #FFFFFF; }
.filtre-gran .fc-chip input:checked + span { background: var(--blue); }
.filtre-etapa { background: #EAF4F8; border: 1px solid #C9E1EC; border-left: 5px solid var(--blue); border-radius: var(--r-md); padding: 6px 8px; }
.filters label { color: var(--blue); }
.config-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px 20px; }
.config-grid .config-ample { grid-column: 1 / -1; }
.config-grid .field > span:first-child { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.secret-in { display: flex; gap: 6px; align-items: center; }
.secret-in input { flex: 1; }

/* =====================================================================
 * Acollida: afegits sobre la base visual de Brúixola
 * ===================================================================== */
:root { --acc-nit: #1D3557; --acc-sol: #FFB703; }
.appbar-logo { color: var(--acc-nit); }
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.checklist li { display: flex; align-items: flex-start; gap: 10px; }
.chk-ic { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.checklist .is-ok .chk-ic { background: var(--ok-bg); color: var(--grn-d); }
.checklist .is-ko .chk-ic { background: var(--warn-bg); color: var(--ora-d); }
.av-foto, .av-ini { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; display: inline-flex; align-items: center; justify-content: center; }
.av-ini { background: var(--sky); color: var(--acc-nit); font-weight: 900; font-size: 15px; }
tr.is-off td { opacity: .6; }
.clau-nova { border: 2px solid var(--acc-sol); }
.clau { font-size: 15px; word-break: break-all; user-select: all; background: var(--sky); padding: 4px 8px; border-radius: 6px; }
.nowrap { white-space: nowrap; }
.dies { display: inline-flex; gap: 3px; }
.dia { font-size: 12px; font-weight: 800; padding: 2px 6px; border-radius: 6px; background: var(--sky); color: var(--mut); opacity: .55; }
.dia.on { background: var(--acc-nit); color: #fff; opacity: 1; }
.aula-fila { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.aula-fila .grow, .row-btns .grow { flex: 1; min-width: 200px; }
.aula-fila input[type=text] { width: 100%; }
.aula-color input[type=color] { width: 44px; height: 40px; padding: 2px; border-radius: 8px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.aula-esborra { margin: -4px 0 8px 54px; }
.aula-nova { padding-top: 12px; border-top: 1px dashed var(--line); }
.chk { display: inline-flex; gap: 6px; align-items: center; font-weight: 700; }
.dies-tria { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dies-tria legend { font-weight: 800; margin-bottom: 8px; padding: 0; }
.dia-chk input { position: absolute; opacity: 0; }
.dia-chk span { display: inline-block; padding: 8px 14px; border-radius: 999px; border: 2px solid var(--line); font-weight: 800; cursor: pointer; background: #fff; }
.dia-chk input:checked + span { background: var(--acc-nit); border-color: var(--acc-nit); color: #fff; }
.dia-chk input:focus-visible + span { outline: 3px solid var(--acc-sol); outline-offset: 2px; }
.fix-head { display: flex; gap: 16px; align-items: center; }
.av-gran { width: 72px; height: 72px; font-size: 26px; }
.link-back { font-weight: 700; }
.admin-head.fix-head { justify-content: flex-start; }
.field.field-inline { display: flex; flex-direction: row; align-items: center; justify-content: flex-start; text-align: left; gap: 10px; flex-wrap: wrap; font-weight: 800; }
.field.field-inline input { width: auto; max-width: 220px; }
.activa { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.qr-activa { width: 200px; height: 200px; background: #fff; border-radius: 12px; padding: 6px; flex: none; }
.qr-activa svg { width: 100%; height: 100%; }
.activa .small { flex: 1; min-width: 240px; }

/* ---------- Panell de la responsable (fase 4) ---------- */
.pn { max-width: 640px; margin: 0 auto; background: var(--card, #fff); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; }
.pn-top { padding: 18px 18px 12px; background: var(--sky); border-bottom: 1px solid var(--line); }
.pn-dia { margin: 0; color: var(--mut); font-weight: 800; font-size: 14px; }
.pn-count { display: flex; align-items: baseline; gap: 12px; margin-top: 2px; }
.pn-count strong { font-size: 56px; line-height: 1; font-weight: 900; color: var(--acc-nit); }
.pn-count span { color: var(--mut); font-size: 15px; line-height: 1.3; }
.pn-quiosc { margin: 8px 0 0; font-size: 13px; color: var(--mut); }
.pn-quiosc.is-avis { color: var(--ora-d); font-weight: 800; }
.pn-tabs { display: flex; gap: 6px; padding: 10px 12px 0; }
.pn-tabs button { flex: 1; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 9px 6px; font: inherit; font-size: 14px; font-weight: 800; color: var(--mut); cursor: pointer; min-height: 44px; }
.pn-tabs button[aria-selected="true"] { background: var(--acc-nit); color: #fff; border-color: var(--acc-nit); }
.pn-cerca { padding: 10px 12px 0; }
.pn-cerca input { width: 100%; }
.pn-list { padding: 4px 12px 12px; min-height: 240px; }
.pn-aula { margin: 14px 0 4px; display: flex; align-items: center; gap: 8px; font-weight: 800; }
.pn-aula i { width: 12px; height: 12px; border-radius: 50%; background: var(--ac); }
.pn-aula em { font-style: normal; color: var(--mut); margin-left: auto; }
.pn-row { display: flex; align-items: center; gap: 10px; padding: 8px 2px; border-bottom: 1px solid var(--line); }
.pn-av { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; }
.pn-ini { display: inline-flex; align-items: center; justify-content: center; background: var(--c); color: #fff; font-weight: 900; font-size: 14px; }
.pn-who { flex: 1; min-width: 0; }
.pn-who b { font-size: 15px; }
.pn-who .pn-sub { display: block; font-size: 13px; color: var(--mut); }
.tag { display: inline-block; font-size: 11px; font-weight: 800; border-radius: 6px; padding: 1px 6px; margin-left: 4px; vertical-align: 1px; }
.tag-ev { background: #FFE8B0; color: #7A4B00; }
.tag-ft { background: #DCE8FF; color: #1D3F8F; }
.tag-mn { background: #EADFF7; color: #5B2C8F; }
.pn-btn { border-radius: 10px; font: inherit; font-size: 13px; font-weight: 800; padding: 8px 12px; min-height: 40px; cursor: pointer; flex: none; }
.pn-x { border: 1px solid var(--line); background: #fff; color: var(--mut); }
.pn-add { border: 0; background: var(--acc-nit); color: #fff; }
.pn-btn.is-perill { border: 0; background: #C0392B; color: #fff; }
.pn-btn:disabled { opacity: .5; }
.pn-note { font-size: 14px; color: var(--mut); margin: 10px 2px; }
.pn-avis { color: var(--ora-d); font-weight: 800; }
.pn-estat { margin: 0; padding: 0 14px 12px; font-size: 14px; font-weight: 700; color: var(--grn-d); min-height: 1.4em; }
.pn-estat.is-error { color: #C0392B; }
@media (max-width: 520px) { .pn { border-radius: 0; border-left: 0; border-right: 0; margin: 0 -16px; } .pn-tabs button { font-size: 13px; } }
.stats-fact { display: flex; flex-wrap: wrap; gap: 28px; }
.stats-fact b { display: block; font-size: 28px; font-weight: 900; color: var(--acc-nit); line-height: 1.1; }
.stats-fact span { color: var(--mut); font-size: 14px; }
.table .num, .table th.num { text-align: right; white-space: nowrap; }
.preus-grid { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.preus-grid legend { font-weight: 800; margin-bottom: 8px; padding: 0; }
.eur-in { display: flex; align-items: center; gap: 6px; }
.eur-in input { width: 100%; text-align: right; }
.eur-in span { font-weight: 800; color: var(--mut); }
tr.is-vigent td { background: var(--sky); }
/* Resums */
.rapids { display: flex; flex-wrap: wrap; gap: 8px; }
.rapid { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); font-weight: 800; font-size: 14px; text-decoration: none; color: var(--ink, inherit); background: #fff; }
.rapid.is-on { background: var(--acc-nit); color: #fff; border-color: var(--acc-nit); }
.reparts { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 14px; font-size: 14px; align-items: center; }
.rp { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.rp-fix { background: #1D3557; } .rp-ev { background: #FFB703; } .rp-ex { background: #E76F51; }
.graf { display: flex; align-items: flex-end; gap: 6px; overflow-x: auto; padding: 4px 2px 2px; min-height: 230px; }
.graf-col { flex: 1 0 34px; max-width: 64px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-decoration: none; color: inherit; border-radius: 8px; padding: 4px 2px; }
.graf-col:hover, .graf-col.is-on { background: var(--sky); }
.graf-n { font-size: 13px; font-weight: 800; }
.graf-barra { width: 70%; height: 160px; display: flex; flex-direction: column; justify-content: flex-end; border-radius: 5px; overflow: hidden; background: rgba(29,53,87,.05); }
.graf-barra i { display: block; width: 100%; }
.graf-dia { font-size: 11px; color: var(--mut); text-align: center; line-height: 1.2; }
details.card > summary { cursor: pointer; }
