#clients .toolbar{display:flex;flex-wrap:wrap;align-items:end;gap:12px;margin:20px 0 12px}#clients .toolbar label{font-size:12px;color:#526278;display:grid;gap:5px}#clients .toolbar input,#clients .toolbar select{min-height:40px;padding:9px;border:1px solid #d8e0e9;border-radius:7px;font:inherit;background:white}#clients .cd-search{flex:1;min-width:220px}#clients .cd-types{display:flex;flex-wrap:wrap;border:1px solid #d8e0e9;border-radius:8px;overflow:hidden}#clients .cd-types button{border:0;background:#f4f6f9;color:#526278;padding:12px;cursor:pointer}#clients .cd-types [aria-pressed=true]{background:#fff0f2;color:#c90020;font-weight:700}#cdFilters{width:100%;display:flex;gap:16px;padding:14px;background:#f4f6f9;border-radius:8px}#cdFilters[hidden]{display:none}#clients .tablecard{overflow:auto}#clients table{width:100%;border-collapse:collapse;font-size:12px}#clients th{background:#f3f5f8;color:#526278;font-size:11px;white-space:nowrap;text-align:left;padding:12px;font-weight:600}#clients td{padding:12px;border-bottom:1px solid #e8edf3;max-width:240px;overflow-wrap:anywhere}#clients tbody tr:hover{background:#fafbfe}#clients .cd-name{border:0;background:none;padding:0;display:flex;gap:10px;align-items:center;text-align:left;color:#142334;cursor:pointer;min-width:170px;font:inherit}#clients .cd-avatar{display:grid;place-items:center;flex-shrink:0;width:29px;height:29px;border-radius:7px;background:#eff1ff;color:#5150a7;font-size:11px;font-weight:700}#clients .cd-pages{display:flex;justify-content:center;align-items:center;gap:16px;margin:18px}#clients button:focus-visible{outline:3px solid #799bff;outline-offset:2px}#cdCount{font-weight:600}#cdNotice{font-size:12px}
@media(max-width:700px){#clients .toolbar{align-items:stretch}#clients .cd-types{width:100%}#clients .cd-types button{flex:1;padding:12px 7px}#clients .cd-search{width:100%;flex-basis:100%}#clients .tablecard{overflow:visible;background:none;border:0}#clients table,#clients tbody{display:block}#clients thead{display:none}#clients tr{display:block;background:white;border:1px solid #dfe5ed;border-radius:12px;padding:10px;margin-bottom:12px}#clients td{display:flex;justify-content:space-between;gap:12px;max-width:none;padding:7px;border:0}#clients td:before{content:attr(data-label);color:#64748b;flex-shrink:0}#clients td:nth-child(2){display:block}#clients td:nth-child(2):before{display:none}#clients .cd-name{font-size:15px}#clients td:last-child{justify-content:flex-end}#cdFilters{box-sizing:border-box;flex-direction:column}}
@media(min-width:701px){#clients table{table-layout:auto}#clients td{white-space:nowrap;overflow-wrap:normal;word-break:normal;max-width:none;padding:10px 8px}#clients th{padding:10px 8px}#clients .cd-name{white-space:nowrap;min-width:0}#clients td .btn{white-space:nowrap}}
/* Shared CRM identity: red, charcoal and white. */
#clients .title{padding:20px 22px;background:linear-gradient(110deg,#fff 65%,#fff0f1);border:1px solid #eadfe2;border-left:5px solid #d71920;border-radius:16px;box-shadow:0 6px 20px #10182805}
#clients .title h1{color:#101828;letter-spacing:-.6px}#clients .title .primary{background:#d71920;box-shadow:0 4px 10px #d7192020}
#clients .toolbar{padding:16px;background:#fff;border:1px solid #e4e8ef;border-radius:14px;box-shadow:0 4px 14px #10182804}
#clients .cd-types{border-color:#efd9dc;background:#fff5f5}#clients .cd-types [aria-pressed=true]{background:#d71920;color:#fff}
#clients .toolbar input:focus,#clients .toolbar select:focus{outline:2px solid #d7192033;border-color:#d71920}
#clients #cdCount{display:inline-block;padding:9px 14px;border-radius:9px;background:#101828;color:white;margin:4px 0 8px;border-left:4px solid #d71920;font-size:13px}
#clients #cdNotice{margin:4px 0 14px;color:#647084;line-height:1.5}
#clients .tablecard{border:1px solid #e1e5ec;box-shadow:0 8px 24px #10182808;border-radius:14px}
#clients th{background:#101828;color:#f5f7fa;border-bottom:3px solid #d71920;font-weight:600;font-size:11px;padding-top:14px;padding-bottom:14px}
#clients tbody tr{background:#fff}#clients tbody tr:nth-child(even){background:#fafbfe}#clients tbody tr:hover{background:#fff1f2}
#clients .cd-avatar{background:#fde8ea;color:#b8101a;border:1px solid #f6cdd1;width:32px;height:32px;border-radius:10px;font-weight:800}
#clients .cd-name strong{color:#17202a}#clients .cd-name:hover strong{color:#ba111b}
#clients td .btn{color:#b8101a;background:#fff;border:1px solid #edc8cc;font-size:12px;padding:8px 12px;border-radius:8px}#clients td .btn:hover{color:white;background:#d71920;border-color:#d71920}
#clients .cd-pages .btn{background:#fff;border:1px solid #dce2ea}#clients .cd-pages .btn:disabled{opacity:.45;cursor:default}#clients #cdPage{font-weight:700;color:#475467;font-size:13px}
@media(max-width:700px){#clients .title{padding:16px;align-items:center}#clients .title h1{font-size:25px}#clients .toolbar{padding:12px}#clients table{min-width:0}#clients .tablecard{border:0;box-shadow:none}#clients tr{border-left:3px solid #d71920;box-shadow:0 3px 12px #10182806}#clients tbody tr:nth-child(even){background:#fff}#clients .cd-name{padding:4px 0 10px}#clients td .btn{min-height:40px}}
/* Fit the available panel, including when the navigation sidebar is open. */
#clients{container-type:inline-size;min-width:0}
#clients .tablecard{max-width:100%;box-sizing:border-box}
@media(min-width:701px){
 #clients table{table-layout:fixed;width:100%;min-width:0}
 #clients th,#clients td{box-sizing:border-box;padding-left:6px;padding-right:6px}
 #clients th{white-space:normal;overflow-wrap:normal}
 #clients td{white-space:normal;overflow-wrap:normal}
 #clients th:nth-child(1){width:6%}#clients th:nth-child(2){width:18%}#clients th:nth-child(3){width:7%}#clients th:nth-child(4){width:15%}
 #clients th:nth-child(5),#clients th:nth-child(6){width:7%}#clients th:nth-child(7){width:10%}#clients th:nth-child(8){width:7%}
 #clients th:nth-child(9){width:5%}#clients th:nth-child(10){width:6%}#clients th:nth-child(11){width:5%}#clients th:nth-child(12){width:7%}
 #clients td:nth-child(1),#clients td:nth-child(3),#clients td:nth-child(5),#clients td:nth-child(6),#clients td:nth-child(9){white-space:nowrap;overflow-wrap:normal;font-variant-numeric:tabular-nums}
 #clients td:nth-child(4){overflow-wrap:anywhere}
 #clients .cd-name{width:100%;white-space:normal;gap:7px}
 #clients .cd-name strong{min-width:0;overflow-wrap:normal}
 #clients td .btn{padding:8px 6px;width:100%;white-space:nowrap;line-height:1.3}
}
@media(max-width:900px){
@container (max-width:1050px){
 #clients .tablecard{overflow:visible;background:none;border:0;box-shadow:none}
 #clients table,#clients tbody{display:block;width:100%;min-width:0}
 #clients thead{display:none}
 #clients tbody{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
 #clients tr{display:block;min-width:0;background:white!important;border:1px solid #dfe5ed;border-left:3px solid #d71920;border-radius:12px;padding:12px;margin:0}
 #clients td{display:flex;justify-content:space-between;gap:12px;max-width:none;min-width:0;padding:7px 0;border:0;white-space:normal;overflow-wrap:anywhere;text-align:right}
 #clients td:before{content:attr(data-label);color:#64748b;flex-shrink:0;text-align:left}
 #clients td:nth-child(2){display:block;text-align:left}
 #clients td:nth-child(2):before{display:none}
 #clients .cd-name{font-size:14px;white-space:normal;padding:4px 0 10px}
 #clients td:last-child{justify-content:flex-end}
 #clients td .btn{width:auto;min-height:40px;white-space:nowrap;padding:8px 12px}
}
}
@container (max-width:650px){#clients tbody{grid-template-columns:minmax(0,1fr)}}
@media(min-width:701px){#clients th:nth-child(2){width:16%}#clients th:nth-child(11){width:7%}}

/* Preserve complete words and the edit action in desktop rows. */
@media(min-width:701px){
 #clients th:nth-child(2){width:14%}#clients th:nth-child(4){width:13%}
 #clients th:nth-child(10){width:8%}#clients th:nth-child(12){width:9%}
 #clients td:nth-child(8),#clients td:nth-child(10),#clients td:nth-child(11){word-break:normal;overflow-wrap:normal}
 #clients td:last-child .btn{white-space:nowrap;min-width:90px}
}

/* Show all twelve columns within the desktop panel without horizontal scrolling. */
@container (min-width:1051px){
 #clients .tablecard{overflow-x:visible;scrollbar-gutter:auto}
 #clients table{table-layout:fixed;width:100%;min-width:0;max-width:100%;font-size:11px;line-height:1.45}
 #clients th,#clients td{white-space:normal;overflow-wrap:anywhere;word-break:normal;padding:8px}
 #clients th{font-size:10px;line-height:1.4;padding-top:12px;padding-bottom:12px}
 #clients th:nth-child(1){width:7%}#clients th:nth-child(2){width:15%}#clients th:nth-child(3){width:7%}#clients th:nth-child(4){width:14%}
 #clients th:nth-child(5),#clients th:nth-child(6){width:7%}#clients th:nth-child(7){width:10%}#clients th:nth-child(8){width:8%}
 #clients th:nth-child(9){width:5%}#clients th:nth-child(10){width:7%}#clients th:nth-child(11){width:6%}#clients th:nth-child(12){width:7%}
 #clients td:nth-child(8),#clients td:nth-child(10),#clients td:nth-child(11){overflow-wrap:anywhere;word-break:normal;white-space:normal}
 #clients th:nth-child(n+9),#clients td:nth-child(n+9){padding-left:10px;padding-right:10px}
 #clients td:nth-child(11){border-left:1px solid #edf0f4}
 #clients .cd-avatar{width:27px;height:27px;font-size:10px;border-radius:8px}
 #clients .cd-name{width:100%;min-width:0;white-space:normal;gap:6px}
 #clients .cd-name strong{min-width:0;white-space:normal;overflow-wrap:anywhere}
 #clients td:last-child .btn{width:100%;min-width:0;white-space:normal;overflow-wrap:normal;padding:7px 3px;line-height:1.4;font-size:11px}
}
/* Keep the full customer name without an initials badge. */
#clients .cd-avatar{display:none}

@container (min-width:1051px){#clients td:nth-child(1),#clients td:nth-child(3),#clients td:nth-child(5),#clients td:nth-child(6),#clients td:nth-child(9){white-space:normal;overflow-wrap:anywhere;word-break:normal}}

/* A l'ordinador es conserva la taula encara que la finestra sigui estreta. */
@media(min-width:901px){
 #clients .tablecard{overflow-x:auto}
 #clients table{display:table;min-width:1051px}
 #clients thead{display:table-header-group}
 #clients tbody{display:table-row-group}
 #clients tr{display:table-row}
 #clients th,#clients td{display:table-cell}
}
@media(min-width:901px){@container(min-width:1051px){#clients table{min-width:0}}}

/* Same customer table on phones and tablets; scroll only within the list. */
#clients .cd-table-hint{display:none}
@media(max-width:1050px){
 #clients{min-width:0;max-width:100%}
 #clients .cd-table-hint{display:block;color:#64748b;font-size:13px;line-height:1.5;margin:8px 0}
 #clients .tablecard{display:block;width:100%;max-width:100%;box-sizing:border-box;overflow-x:auto;overflow-y:auto;-webkit-overflow-scrolling:touch;touch-action:pan-x pan-y;background:#fff;border:1px solid #e1e5ec;border-radius:14px;box-shadow:0 4px 14px #10182806}
 #clients .tablecard:focus-visible{outline:3px solid #799bff;outline-offset:2px}
 #clients table{display:table;width:1280px;min-width:1280px;max-width:none;table-layout:fixed;border-collapse:collapse;font-size:12px;line-height:1.45}
 #clients thead{display:table-header-group}
 #clients tbody{display:table-row-group}
 #clients tr{display:table-row;padding:0;margin:0;border:0;border-radius:0;box-shadow:none}
 #clients th,#clients td{display:table-cell;box-sizing:border-box;padding:12px 10px;max-width:none;min-width:0;text-align:left;vertical-align:top;white-space:normal;overflow-wrap:anywhere;border:0;border-bottom:1px solid #e8edf3}
 #clients th{background:#101828;color:#f5f7fa;font-size:11px;border-bottom:3px solid #d71920}
 #clients td:before{display:none;content:none}
 #clients td:nth-child(2){display:table-cell;text-align:left}
 #clients tbody tr{background:#fff!important}
 #clients tbody tr:nth-child(even){background:#fafbfe!important}
 #clients th:nth-child(1){width:105px}#clients th:nth-child(2){width:190px}#clients th:nth-child(3){width:100px}#clients th:nth-child(4){width:180px}
 #clients th:nth-child(5),#clients th:nth-child(6){width:100px}#clients th:nth-child(7){width:170px}#clients th:nth-child(8){width:135px}
 #clients th:nth-child(9){width:80px}#clients th:nth-child(10){width:100px}#clients th:nth-child(11){width:110px}#clients th:nth-child(12){width:115px}
 #clients .cd-name{display:flex;width:100%;min-width:0;white-space:normal;font-size:14px;padding:0;gap:0;min-height:44px;align-items:flex-start}
 #clients .cd-name strong{white-space:normal;overflow-wrap:anywhere}
 #clients td .btn,#clients td:last-child .btn{width:auto;min-width:0;min-height:44px;padding:9px 10px;white-space:nowrap;font-size:12px}
 #clients .cd-search{min-width:0;max-width:100%}
 #clients .toolbar label{min-width:0;max-width:100%}
 #clients .cd-pages{gap:12px;margin:16px 0;flex-wrap:wrap}
}
