:root{--primary:#17665d;--primary-hover:#104d46;--text-main:#202c35;--text-muted:#61707a;--accent:#17665d}
*{box-sizing:border-box;letter-spacing:0}
body{display:block;background:#f3f5f6;color:var(--text-main);font:15px/1.55 Inter,system-ui,sans-serif}
a{color:var(--primary)}
.container{width:calc(100% - 64px);max-width:1280px;margin:0 auto;padding:0 0 48px;background:none;border:0;border-radius:0;box-shadow:none;backdrop-filter:none;animation:none}
.logo-header{display:grid;grid-template-columns:152px 1fr;column-gap:24px;align-content:center;min-height:142px;border-bottom:1px solid #d9e0e3;margin-bottom:24px;text-align:left}
.logo-header img{grid-row:1 / 3;width:152px;height:104px;object-fit:cover;max-height:none!important;margin:0!important;border-radius:4px!important}
.logo-header h1{margin:auto 0 0;font-size:26px;font-weight:650;background:none;-webkit-text-fill-color:#202c35!important}
.logo-header p{margin:0 0 auto;color:var(--text-muted);font-size:14px}
h2,h3{font-size:20px;line-height:1.3;margin:0 0 24px}
.top-bar{gap:16px;margin-bottom:24px;border-color:#d9e0e3;font-size:14px}
.top-bar a{color:var(--primary)}
.top-bar>div{display:flex;flex-wrap:wrap;gap:16px}
.portal-layout{display:grid;grid-template-columns:minmax(300px,380px) minmax(0,1fr);gap:48px;align-items:start}
.new-incident{padding-right:28px;border-right:1px solid #d9e0e3}
.workspace .logo-header{padding:22px 0;grid-template-columns:152px minmax(0,.7fr) minmax(0,1.3fr);min-height:230px}
.workspace .workspace-heading{display:block;min-width:0}
.history-tools .overview{padding:16px 0}
.history-tools .metric strong{font-size:24px}
.history-tools .filters{grid-template-columns:minmax(0,1fr) 135px 110px;margin:0}
.history-tools label{margin:0;font-size:11px}
.history-tools input,.history-tools select{font-size:13px;min-height:40px;padding:8px}
.account-actions{align-items:center;justify-content:flex-end;margin-left:auto}
.workspace .account-settings{position:relative;margin:0;border:0}
.workspace .account-settings summary{padding:8px 0;font-size:13px;font-weight:500;color:var(--primary)}
.workspace .account-settings form{position:absolute;right:0;top:100%;z-index:20;width:340px;max-width:calc(100vw - 28px);padding:20px;background:#fff;border:1px solid #ccd9d4;border-radius:8px;box-shadow:0 12px 32px #203a4320}
.workspace .account-settings label{margin-bottom:12px}
@media(max-width:1100px){.history-tools .filters{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.history-tools .filters>label:first-child{grid-column:1 / -1}}
@media(max-width:850px){.workspace .logo-header{grid-template-columns:100px minmax(0,1fr);padding:18px 0;row-gap:22px}.workspace .workspace-heading{grid-column:1 / -1;grid-row:3;padding:0}.workspace .mobile-history-title{display:none}.history-tools .filters{grid-template-columns:minmax(0,1fr) 140px 120px}.history-tools .filters>label:first-child{grid-column:auto}}
@media(max-width:600px){.history-tools .filters{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.history-tools .filters>label:first-child{grid-column:1 / -1}.workspace .account-actions{align-self:flex-end;gap:20px}.workspace .account-settings form{right:-55px}.workspace-heading h2{font-size:20px}}
.workspace .portal-layout{grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:40px}
.workspace .logo-header{grid-template-columns:152px minmax(0,1fr) minmax(0,1fr)}
.workspace-heading{grid-column:3;grid-row:1 / 3;align-self:center;padding-left:12px}
.workspace-heading h2{margin:6px 0 0;font-size:23px}
.eyebrow{font-size:11px;text-transform:uppercase;color:#8a7039;font-weight:600}
.mobile-history-title{display:none}
.workspace textarea#description{min-height:290px;line-height:1.7}
@media(min-width:851px) and (max-width:1100px){.workspace .filters{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.workspace .filters>label:first-child{grid-column:1 / -1}}
.draft-line{display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px;margin-top:8px;color:var(--text-muted);font-size:12px}
.text-button{background:none;color:var(--primary);padding:0;min-height:24px;font-size:12px;text-decoration:underline}
.drop-zone{border:1px dashed #9eb7ae;border-radius:8px;padding:22px;text-align:center;background:#edf4f1}
.drop-zone.dragging{background:#d9ede4;border-color:var(--primary)}
.drop-zone>span{display:block;font-size:13px}
.drop-zone .upload-mark{font-size:28px;color:var(--primary)}
.drop-zone input{margin:10px auto;font-size:12px}
.drop-zone small{color:var(--text-muted);font-size:11px}
.selected-documents{list-style:none;margin:12px 0;padding:0}
.selected-documents li{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 10px;background:white;border-bottom:1px solid #d9e0e3;font-size:12px;overflow-wrap:anywhere}
.remove-document{background:none;color:#a02436;font-size:22px;padding:0;min-width:32px;min-height:32px;flex-shrink:0}
.document-link{display:flex;align-items:center;gap:10px;padding:10px 12px;background:#f2f6f5;border:1px solid #dce6e1;border-radius:6px;margin:8px 0;font-size:13px;overflow-wrap:anywhere}
.document-link small{margin-left:auto;white-space:nowrap;color:var(--text-muted)}
.smtp-settings{border-top:1px solid #d9e0e3;border-bottom:1px solid #d9e0e3;margin-bottom:24px;padding-bottom:16px}
.smtp-settings:not([open]){padding-bottom:0}
.smtp-form{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;align-items:end}
.smtp-form input:not([type=checkbox]){display:block;width:100%;border:1px solid #cbd5db;border-radius:6px;padding:11px 12px;background:white;font:inherit;min-height:44px}
.smtp-form .check-label{grid-column:1 / -1;display:flex;align-items:center;gap:10px}
.smtp-note{font-size:13px;color:var(--text-muted)}
@media(max-width:850px){.workspace .portal-layout{grid-template-columns:minmax(0,1fr)}.workspace .logo-header{grid-template-columns:152px minmax(0,1fr)}.workspace-heading{display:none}.mobile-history-title{display:block}.smtp-form{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.workspace .logo-header{grid-template-columns:100px minmax(0,1fr)}.smtp-form{grid-template-columns:minmax(0,1fr)}.workspace textarea#description{min-height:260px}}
.session-profile{display:flex;align-items:center;gap:12px;min-width:0}
.top-bar>.session-profile{flex-wrap:nowrap}
.session-profile>div{min-width:0;display:block}
.session-profile strong{display:block;font-size:16px;color:#203a43}
.profile-email{display:block;font-size:13px;color:var(--text-muted);overflow-wrap:anywhere}
.avatar{display:grid;place-items:center;flex:0 0 42px;width:42px;height:42px;border-radius:50%;background:#deece7;color:#17665d;font-weight:650;font-size:18px}
.role-label{font-size:11px;font-weight:600;color:#706030}
.top-bar{padding:16px 0 24px}
.logo-header{border-bottom:2px solid #d4b67a}
.team-count{font-size:12px;font-weight:400;color:var(--text-muted);margin-left:12px}
.users-section{border-top:0}
.create-user{display:grid;grid-template-columns:1fr 1.2fr 1.2fr auto;gap:16px;align-items:end;padding:0 0 24px;margin-bottom:24px;border-bottom:1px solid #d9e0e3}
.create-user .form-group{min-width:0!important;margin:0!important}
.team-list{display:flex;flex-direction:column;gap:14px;margin-bottom:28px}
.team-member{display:grid;grid-template-columns:minmax(140px,.8fr) minmax(180px,1fr) minmax(200px,1fr) auto;align-items:center;gap:24px;padding:22px;background:#fff;border:1px solid #d7e0e4;border-radius:8px}
.member-identity{display:flex;align-items:center;gap:12px;min-width:0}
.member-identity h3{margin:0 0 4px;font-size:17px}
.member-identity small{display:block;margin-top:6px;color:var(--text-muted);font-size:12px}
.access-label{font-size:11px;padding:3px 7px;border-radius:4px;display:inline-block}
.access-label.pending{background:#fff1d1;color:#805600}
.access-label.active{background:#e6f3eb;color:#226441}
.team-member form{min-width:0;margin:0}
.team-member input{margin-bottom:10px}
.team-member label{font-size:12px}
.team-member button{font-size:13px}
.member-email>button,.password-reset>button{width:100%}
.member-delete{align-self:end;padding-bottom:2px}
.member-actions{display:flex;flex-direction:column;gap:12px;align-self:end}
.maintenance-settings{margin-bottom:24px;border-bottom:1px solid #d9e0e3;padding-bottom:12px}
.maintenance-settings p{font-size:13px;max-width:800px;color:var(--text-muted)}
.maintenance-settings .check-label{display:flex;align-items:flex-start;gap:10px;margin-bottom:16px}
.member-actions form{margin:0}
.member-actions button{width:100%}
.member-welcome button:disabled{opacity:.5;cursor:not-allowed}
@media(max-width:1050px){.team-member{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:20px}.member-identity{grid-column:1 / -1}.member-delete{grid-column:1 / -1}.create-user{grid-template-columns:1fr 1fr}}
@media(max-width:600px){.team-member{grid-template-columns:minmax(0,1fr);padding:18px;gap:20px}.create-user{grid-template-columns:minmax(0,1fr)}.team-count{display:block;margin:4px 0 0 18px}.session-profile strong{font-size:15px}.top-bar>.session-profile{gap:10px}.profile-email{font-size:12px}}
.account-settings{margin-top:28px;border-top:1px solid #d9e0e3}
.account-settings form{max-width:480px}
.password-reset{margin-bottom:16px;text-align:left}
.users-section th:last-child{width:230px!important}
.portal-layout>*{min-width:0}
.card{min-width:0;padding:0;background:none;border:0;border-radius:0;margin:0 0 28px}
.history{margin-top:0!important}
.form-group{min-width:0}
label{font-weight:500;font-size:13px;color:#42525e}
input[type=text],input[type=password],input[type=email],input[type=search],select,textarea{font:inherit;width:100%;min-width:0;border:1px solid #cbd5db;border-radius:6px;padding:11px 12px;background:#fff;color:var(--text-main);min-height:44px}
textarea{resize:vertical;min-height:96px}
input[type=file]{display:block;max-width:100%;font-size:13px}
:focus-visible{outline:3px solid #87b8ad;outline-offset:3px}
button{width:auto;border-radius:6px;min-height:44px;white-space:normal!important;line-height:1.4!important;height:auto!important}
button:hover{transform:none}
.new-incident>button,form:has(#password)>button{width:100%}
.btn-secondary{background:#fff;border-color:#bac9d0;color:var(--primary)}
.btn-danger{background:#fff1f2;color:#a02436;border-color:#ebbec5}
.alert-error{color:#9d2235;background:#fff0f2;border-color:#ecc2c8}
.alert-success{color:#145b47;background:#e8f5ee;border-color:#b6dcca}
.incident{background:#fff;border:1px solid #d7e0e4;border-radius:8px;padding:22px!important;margin-bottom:16px;overflow-wrap:anywhere;scroll-margin-top:24px}
.incident>div:first-child{flex-wrap:wrap;gap:12px}
.incident form div[style*="display: flex"]{flex-wrap:wrap}
.status-badge,.priority-badge{border-radius:4px;font-size:12px;padding:4px 9px;border:0;animation:none}
.status-pendent{color:#835800;background:#fff2cc}.status-encurs{color:#225f90;background:#e5f1fc}.status-resolt{color:#1a654c;background:#e2f3e9}
.priority-baixa{color:#55636e;background:#eef1f3}.priority-mitjana{color:#356363;background:#e9f2f0}.priority-alta{color:#8a5800;background:#fff0cf}.priority-urgent{color:#a02436;background:#ffe6ea}
.comment-bubble{max-width:92%;font-size:14px}
.comment-admin{background:#eaf3f1;border-left-color:#418c7e}
.comment-treballador{background:#f2f4f6;border-left-color:#94a7b5}
.comment-meta{flex-wrap:wrap}
img{max-width:100%;height:auto}
.file-upload-label{border-color:#bac9d0!important;min-height:36px}
.users-section{border-top:1px solid #d9e0e3;border-bottom:1px solid #d9e0e3;margin-bottom:32px}
summary{cursor:pointer;padding:18px 0;font-weight:600}
.users-section h2,.users-section p{display:none}
table{table-layout:fixed}
th,td{border-color:#d9e0e3;overflow-wrap:anywhere}
th{letter-spacing:0}
td input{width:100%!important}
.overview{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;padding:4px 0 24px}
.metric{border-left:3px solid #ccaa6c;padding-left:16px}
.metric strong{display:block;font-size:28px;line-height:1.2}
.metric span{font-size:13px;color:var(--text-muted)}
.filters{display:grid;grid-template-columns:minmax(120px,1fr) 150px 130px;gap:12px;margin:0 0 20px}
.filter-empty{padding:24px 0;color:var(--text-muted)}
[hidden]{display:none!important}
body:has(#password) .container{max-width:480px}
body:has(#password) .logo-header{grid-template-columns:1fr;text-align:center;padding:24px 0;gap:10px}
body:has(#password) .logo-header img{grid-row:auto;margin:auto!important;width:220px;height:150px}
@media(min-width:1100px){.admin .card:has(>.incident){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 24px;align-items:start}.admin .card>h2,.admin .card>.overview,.admin .card>.filters,.admin .card>.filter-empty{grid-column:1 / -1}}
@media(max-width:850px){.container{width:calc(100% - 40px)}.portal-layout{grid-template-columns:1fr;gap:32px}.new-incident{padding:0 0 32px;border-right:0;border-bottom:1px solid #d9e0e3}}
@media(max-width:600px){.container{width:calc(100% - 28px)}.logo-header{grid-template-columns:100px minmax(0,1fr);gap:16px;min-height:112px}.logo-header img{width:100px;height:76px}.logo-header h1{font-size:22px}.logo-header p{font-size:12px}.top-bar{align-items:flex-start;font-size:13px}.incident{padding:16px!important}.filters{grid-template-columns:1fr 1fr}.filters>label:first-child{grid-column:1 / -1}.overview{gap:10px}.metric{padding-left:10px}.metric strong{font-size:24px}input,select,textarea{font-size:16px!important}.users-section table,.users-section tbody,.users-section tr,.users-section td{display:block;width:100%;white-space:normal}.users-section thead{display:none}.users-section tr{padding:14px 0;border-bottom:1px solid #cbd5db}.users-section td{border:0;text-align:left!important;padding:5px 0}.users-section td:nth-child(3)::before{content:"Incidències: "}.users-section .form-group{min-width:0!important;flex-basis:100%!important}.comment-bubble{max-width:100%}}
