/* TA26-CLEAN v1.0 · HOME. Capa visual sense canvis funcionals. */
:root{--ta-primary:#166A8A;--ta-teal:#168D83;--ta-ink:#1F3442;--ta-muted:#5A7280;--ta-bg:#F3F7FA;--ta-line:#D8E5EB;--ta-shadow:0 10px 28px rgba(29,67,84,.09)}
*,*::before,*::after{box-sizing:border-box}
html{min-height:100%;}
body{margin:0!important;min-height:100dvh!important;height:auto!important;background:var(--ta-bg)!important;color:var(--ta-ink);font-family:'Poppins',system-ui,sans-serif!important;}
.capçalera{height:80px;min-height:80px;flex:0 0 80px!important;background:#fff!important;border-bottom:1px solid var(--ta-line);box-shadow:0 4px 16px rgba(23,63,82,.06)!important;display:flex;align-items:center;justify-content:center;padding:.4rem 1rem!important}
.capçalera img{height:auto!important;max-height:64px;max-width:min(74vw,235px);width:auto!important;object-fit:contain}
.cos{flex:1 1 auto!important;overflow-y:auto!important;min-height:0;width:100%;justify-content:center!important;gap:0!important;padding:clamp(1.2rem,3vw,2.5rem) 1rem!important}
.cos>div:first-child{width:min(100%,560px);justify-content:center;gap:.8rem!important;align-items:center}
.cos h1{font-size:clamp(1.8rem,4vw,2.5rem)!important;line-height:1.18;letter-spacing:-.025em;color:#173F52;margin:0 0 1.2rem!important}
#registreIcon{margin-bottom:1.2rem;flex-shrink:0}
.cos .bg-yellow-100{max-width:560px!important;width:100%;background:#fff!important;border:1px solid var(--ta-line);border-radius:24px!important;box-shadow:var(--ta-shadow)!important;padding:clamp(1.4rem,3vw,2rem)!important;gap:1.15rem!important}
.cos label{display:block;color:#2F4E5F;font-size:.95rem;font-weight:600;margin-bottom:.5rem!important}
#login,#password{height:50px;min-height:50px;background:#fff!important;color:var(--ta-ink);border:1px solid #BFD0D8!important;border-radius:12px!important;padding:.75rem .95rem!important;outline:none;width:100%}
#password{padding-right:3.6rem!important}
#login:focus-visible,#password:focus-visible,.cos a:focus-visible,.peu button:focus-visible,.relative button:focus-visible{outline:3px solid #0B8BB0!important;outline-offset:3px}
.relative button{min-height:44px;min-width:44px;top:3px!important;right:4px!important;display:flex;align-items:center;justify-content:center;border-radius:10px;color:#436879!important;background:transparent}
#registreText,#recordarCredencials,#errorMsg{max-width:560px;width:100%;padding:0 .6rem;line-height:1.5}
#registreText,#recordarCredencials{font-size:.94rem;color:#4b6573;margin-top:1rem!important}
#registreText a,#recordarCredencials a{font-weight:600;color:var(--ta-primary)!important;text-decoration:underline;text-underline-offset:3px}
#errorMsg{font-size:.95rem;color:#B91C1C!important;margin-top:.75rem!important;min-height:1rem}
.peu{height:auto!important;min-height:96px;flex:0 0 auto!important;background:rgba(255,255,255,.98)!important;border-top:1px solid var(--ta-line);box-shadow:0 -5px 18px rgba(23,63,82,.06)!important;padding:1rem 1rem max(1rem,env(safe-area-inset-bottom))!important;gap:.5rem!important;width:100%}
.peu button{min-height:48px;min-width:200px;border-radius:12px!important;background:var(--ta-teal)!important;font-size:.95rem;font-weight:600;padding:.7rem 1.3rem!important;box-shadow:0 7px 14px rgba(22,141,131,.14);transition:filter .16s,transform .16s}
.peu button:hover{background:#137b73!important;filter:brightness(.98)}
.peu button:active{transform:translateY(1px)}
.peu p{color:var(--ta-muted)!important;font-size:.78rem!important;margin:0!important}
@media(max-width:480px){.capçalera{height:74px;min-height:74px;flex-basis:74px!important}.capçalera img{max-height:57px}.cos{justify-content:flex-start!important;padding:1.4rem 1rem 1.7rem!important}.cos h1{font-size:1.75rem!important}.cos .bg-yellow-100{padding:1.3rem!important}.peu button{width:min(100%,260px)}}
@media(max-height:650px){.cos{justify-content:flex-start!important}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important;animation:none!important}}

/* Casella per autocompletar les credencials */
.ta26-remember-control{display:flex!important;align-items:center;gap:11px;margin:0!important;color:#2F4E5F;font-size:.94rem;cursor:pointer;user-select:none}
.ta26-remember-control input[type="checkbox"]{appearance:auto;accent-color:var(--ta-teal);width:19px;height:19px;flex:0 0 19px;margin:0;cursor:pointer}
.ta26-remember-control:focus-within{outline:2px solid #0B8BB0;outline-offset:5px;border-radius:4px}

/* Selector i bandera a la mateixa línia, sense elements superiors. */
.capçalera{position:relative}
.ta26-language-control{position:absolute;right:clamp(8px,2vw,24px);top:50%;transform:translateY(-50%);display:flex;flex-direction:row;align-items:center;gap:9px;z-index:2}
.ta26-language-control select{height:42px;max-width:155px;padding:5px 27px 5px 10px;border:1px solid #BFD0D8;border-radius:10px;background:#fff;color:var(--ta-ink);font-size:.88rem;font-weight:600;cursor:pointer}
.ta26-language-control select:focus-visible{outline:3px solid #0B8BB0;outline-offset:2px}
.capçalera img.ta26-language-flag{display:block!important;width:30px!important;height:20px!important;min-width:30px!important;min-height:20px!important;max-width:30px!important;max-height:20px!important;object-fit:contain;border:1px solid rgba(31,52,66,.22);border-radius:3px;box-shadow:0 1px 4px rgba(0,0,0,.09);flex-shrink:0}
@media(max-width:540px){.capçalera img:not(.ta26-language-flag){max-width:43vw!important}.ta26-language-control{right:7px;gap:5px}.ta26-language-control select{max-width:113px;font-size:.73rem;padding-left:5px;height:38px}.capçalera img.ta26-language-flag{width:26px!important;height:18px!important;min-width:26px!important;min-height:18px!important;max-width:26px!important;max-height:18px!important}}

/* PWA v5 — capçalera mòbil en dues zones sense superposicions */
@media (max-width: 600px) {
  .capçalera {display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important;padding:6px 10px!important;}
  .capçalera > img:not(.ta26-language-flag) {flex:0 1 auto!important;max-width:calc(100% - 157px)!important;width:auto!important;max-height:54px!important;min-width:0!important;}
  .ta26-language-control {position:static!important;inset:auto!important;transform:none!important;flex:0 0 auto!important;max-width:149px!important;gap:4px!important;z-index:auto!important;}
  .ta26-language-control select {width:112px!important;max-width:112px!important;min-width:0!important;font-size:12px!important;padding:5px 19px 5px 6px!important;}
  .capçalera img.ta26-language-flag {width:26px!important;height:18px!important;min-width:26px!important;max-width:26px!important;}
}
@media (max-width: 355px) {
  .capçalera {padding-inline:6px!important;gap:5px!important;}
  .capçalera > img:not(.ta26-language-flag) {max-width:calc(100% - 139px)!important;}
  .ta26-language-control select {width:96px!important;max-width:96px!important;font-size:11px!important;}
}
