/* MutualOS v132 - approved client master reference layout */
.client-master-layout-v124 .detailgrid{display:grid;grid-template-columns:minmax(0,1fr) minmax(320px,.38fr);gap:12px;align-items:start}
.client-master-layout-v124 .detailgrid>.card:first-child{grid-column:1;grid-row:1;position:relative;padding-right:250px;min-height:285px;height:auto;box-sizing:border-box;min-width:0}
.client-master-layout-v124 .client-right-column-v125{grid-column:2;grid-row:1;display:flex;flex-direction:column;gap:12px;align-self:start;min-width:0;height:auto}
.client-master-actions-v123 .client-data-actions-v123{position:absolute;top:58px;right:22px;width:210px;display:flex;flex-direction:column;gap:10px}
.client-master-actions-v123 .client-data-actions-v123 .btn,.client-master-actions-v123 .client-data-actions-v123 button,.client-master-actions-v123 .client-data-actions-v123 a{width:100%;margin:0;justify-content:center;text-align:center}
.client-master-layout-v124 .client-identity-v124{padding:16px;margin:0;width:auto;min-width:0}
.client-master-layout-v124 .client-right-column-v125>.card{margin:0;width:auto;min-width:0;height:auto}
.client-master-layout-v124 .client-identity-v124 .pagehead{margin:0 0 12px}
.client-master-layout-v124 .client-identity-v124 .pagehead h1{margin:0;font-size:24px}
.client-master-layout-v124 .client-identity-v124 .pagehead p{margin:4px 0 0}
.client-master-layout-v124 .client-contact-v124{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.client-master-layout-v124 .client-contact-v124 .btn,.client-master-layout-v124 .client-contact-v124 button,.client-master-layout-v124 .client-contact-v124 a{width:100%;margin:0;justify-content:center;text-align:center}
@media(max-width:900px){.client-master-layout-v124 .detailgrid{grid-template-columns:minmax(0,1fr) minmax(300px,.42fr)}.client-master-layout-v124 .detailgrid>.card:first-child{padding-right:210px}.client-master-actions-v123 .client-data-actions-v123{right:16px;width:180px}}
@media(max-width:760px){.client-master-layout-v124 .detailgrid{grid-template-columns:1fr}.client-master-layout-v124 .detailgrid>.card:first-child,.client-master-layout-v124 .client-right-column-v125{grid-column:1;grid-row:auto}.client-master-layout-v124 .detailgrid>.card:first-child{padding-right:16px}.client-master-actions-v123 .client-data-actions-v123{position:static;width:auto;margin-top:16px;padding-top:14px;border-top:1px solid var(--line)}}

/* MutualOS v134 - approved reference: identity/summary left, client data right */
.client-master-layout-v124 .detailgrid{
 display:grid;
 grid-template-columns:minmax(320px,.38fr) minmax(0,1fr);
 gap:12px;
 align-items:stretch;
}
.client-master-layout-v124 .client-right-column-v125{
 grid-column:1;
 grid-row:1;
 display:flex;
 flex-direction:column;
 gap:10px;
 align-self:stretch;
 min-width:0;
 height:100%;
}
.client-master-layout-v124 .detailgrid>.card:first-child{
 grid-column:2;
 grid-row:1;
 position:relative;
 padding-right:250px;
 min-height:285px;
 height:100%;
 box-sizing:border-box;
 min-width:0;
}
.client-master-layout-v124 .client-right-column-v125>.card{margin:0;width:auto;box-sizing:border-box}
.client-master-layout-v124 .client-identity-v124{padding:14px 16px}
.client-master-layout-v124 .client-identity-v124 .pagehead{margin:0 0 10px}
.client-master-layout-v124 .client-contact-v124{gap:7px}
.client-master-layout-v124 .client-contact-v124 .btn,.client-master-layout-v124 .client-contact-v124 button,.client-master-layout-v124 .client-contact-v124 a{min-height:38px;padding-top:7px;padding-bottom:7px}
.client-master-layout-v124 .client-right-column-v125>.card:last-child{flex:1;min-height:0}
@media(max-width:900px){
 .client-master-layout-v124 .detailgrid{grid-template-columns:minmax(300px,.42fr) minmax(0,1fr)}
 .client-master-layout-v124 .detailgrid>.card:first-child{padding-right:210px}
}
@media(max-width:760px){
 .client-master-layout-v124 .detailgrid{grid-template-columns:1fr}
 .client-master-layout-v124 .client-right-column-v125,.client-master-layout-v124 .detailgrid>.card:first-child{grid-column:1;grid-row:auto;height:auto}
 .client-master-layout-v124 .detailgrid>.card:first-child{padding-right:16px}
}

/* MutualOS v135 - harden approved left-small/right-wide layout and prevent data compression */
.client-master-layout-v124 .detailgrid{
 grid-template-columns:minmax(360px,0.38fr) minmax(760px,1fr) !important;
}
.client-master-layout-v124 .client-right-column-v125{
 grid-column:1 !important;
 min-width:360px;
}
.client-master-layout-v124 .detailgrid>.card:first-child{
 grid-column:2 !important;
 min-width:760px;
 padding-right:250px !important;
 overflow:visible;
}
.client-master-layout-v124 .detailgrid>.card:first-child .row,
.client-master-layout-v124 .detailgrid>.card:first-child .kv,
.client-master-layout-v124 .detailgrid>.card:first-child td,
.client-master-layout-v124 .detailgrid>.card:first-child dd{
 min-width:0;
}
.client-master-layout-v124 .detailgrid>.card:first-child{
 word-break:normal;
 overflow-wrap:normal;
}
@media(max-width:1180px){
 .client-master-layout-v124 .detailgrid{grid-template-columns:minmax(320px,.4fr) minmax(600px,1fr) !important}
 .client-master-layout-v124 .client-right-column-v125{min-width:320px}
 .client-master-layout-v124 .detailgrid>.card:first-child{min-width:600px;padding-right:220px !important}
}
@media(max-width:900px){
 .client-master-layout-v124 .detailgrid{grid-template-columns:1fr !important}
 .client-master-layout-v124 .client-right-column-v125,.client-master-layout-v124 .detailgrid>.card:first-child{grid-column:1 !important;min-width:0;height:auto}
 .client-master-layout-v124 .detailgrid>.card:first-child{padding-right:16px !important}
 .client-master-actions-v123 .client-data-actions-v123{position:static;width:auto;margin-top:16px;padding-top:14px;border-top:1px solid var(--line)}
}

/* MutualOS v136 - compact approved client master layout without changing structure */
.client-master-layout-v124 .detailgrid{align-items:start;gap:10px}
.client-master-layout-v124 .detailgrid>.card:first-child{
 min-height:0 !important;
 height:auto !important;
 padding-top:14px;
 padding-bottom:14px;
}
.client-master-layout-v124 .client-right-column-v125{
 height:auto !important;
 align-self:start;
 gap:8px;
}
.client-master-layout-v124 .client-identity-v124{padding:12px 14px}
.client-master-layout-v124 .client-identity-v124 .pagehead{margin:0 0 8px}
.client-master-layout-v124 .client-identity-v124 .pagehead h1{font-size:22px;line-height:1.15}
.client-master-layout-v124 .client-identity-v124 .pagehead p{margin:3px 0 0}
.client-master-layout-v124 .client-contact-v124{gap:6px}
.client-master-layout-v124 .client-contact-v124 .btn,
.client-master-layout-v124 .client-contact-v124 button,
.client-master-layout-v124 .client-contact-v124 a{min-height:34px;padding-top:6px;padding-bottom:6px}
.client-master-layout-v124 .client-right-column-v125>.card:last-child{flex:0 0 auto;padding-top:12px;padding-bottom:12px}
.client-master-actions-v123 .client-data-actions-v123{top:48px;gap:7px}
.client-master-actions-v123 .client-data-actions-v123 .btn,
.client-master-actions-v123 .client-data-actions-v123 button,
.client-master-actions-v123 .client-data-actions-v123 a{min-height:36px;padding-top:6px;padding-bottom:6px}
.client-master-layout-v124 .detailgrid{margin-bottom:10px}
@media(max-width:900px){
 .client-master-layout-v124 .detailgrid{gap:10px}
}

/* MutualOS v137 - uniform top-row height: left stack matches Datos del cliente */
.client-master-layout-v124 .detailgrid{align-items:stretch}
.client-master-layout-v124 .detailgrid>.card:first-child{height:100% !important;align-self:stretch}
.client-master-layout-v124 .client-right-column-v125{
 height:100% !important;
 align-self:stretch;
 display:flex;
 flex-direction:column;
}
.client-master-layout-v124 .client-right-column-v125>.card:last-child{
 flex:1 1 auto;
 min-height:0;
}
@media(max-width:900px){
 .client-master-layout-v124 .detailgrid{align-items:start}
 .client-master-layout-v124 .detailgrid>.card:first-child,
 .client-master-layout-v124 .client-right-column-v125{height:auto !important;align-self:start}
 .client-master-layout-v124 .client-right-column-v125>.card:last-child{flex:0 0 auto}
}

/* v138: client actions must stay inside the data card at normal browser zoom.
   Remove legacy hard minimum widths and the absolute action overlay. */
.client-master-layout-v124 .detailgrid{
 grid-template-columns:minmax(0,.38fr) minmax(0,1fr) !important;
 min-width:0;
 width:100%;
}
.client-master-layout-v124 .client-right-column-v125{
 min-width:0 !important;
}
.client-master-layout-v124 .detailgrid>.card:first-child{
 min-width:0 !important;
 padding-right:16px !important;
 max-width:100%;
 overflow-wrap:anywhere;
}
.client-master-actions-v123 .client-data-actions-v123{
 position:static !important;
 top:auto;
 right:auto;
 width:100% !important;
 max-width:100%;
 margin-top:12px;
 padding-top:12px;
 border-top:1px solid var(--line);
 display:flex;
 flex-direction:row;
 flex-wrap:wrap;
 gap:8px;
 box-sizing:border-box;
}
.client-master-actions-v123 .client-data-actions-v123 .btn,
.client-master-actions-v123 .client-data-actions-v123 button,
.client-master-actions-v123 .client-data-actions-v123 a{
 width:auto !important;
 max-width:100%;
 min-width:0;
 flex:1 1 180px;
 white-space:normal;
 overflow-wrap:anywhere;
 box-sizing:border-box;
}
@media(max-width:1250px){
 .client-master-layout-v124 .detailgrid{grid-template-columns:minmax(0,1fr) !important;}
 .client-master-layout-v124 .client-right-column-v125,
 .client-master-layout-v124 .detailgrid>.card:first-child{
  grid-column:1 !important;
  grid-row:auto !important;
  height:auto !important;
 }
}
@media(max-width:520px){
 .client-master-actions-v123 .client-data-actions-v123{flex-direction:column;}
 .client-master-actions-v123 .client-data-actions-v123 .btn,
 .client-master-actions-v123 .client-data-actions-v123 button,
 .client-master-actions-v123 .client-data-actions-v123 a{
  flex:0 0 auto;
  width:100% !important;
 }
}

/* v139: restore left identity/summary and right client data at desktop/tablet
   widths while preserving the in-flow, non-clipped actions from v138.
   Use flexible columns, not the legacy 360px + 760px hard minimums. */
@media (min-width:980px){
 .client-master-layout-v124 .detailgrid{
  display:grid;
  grid-template-columns:minmax(240px, .38fr) minmax(0, 1fr) !important;
  align-items:stretch;
  gap:12px;
 }
 .client-master-layout-v124 .client-right-column-v125{
  grid-column:1 !important;
  grid-row:1 !important;
  min-width:0 !important;
  height:100% !important;
 }
 .client-master-layout-v124 .detailgrid>.card:first-child{
  grid-column:2 !important;
  grid-row:1 !important;
  min-width:0 !important;
  max-width:100%;
  height:100% !important;
  padding-right:16px !important;
 }
}
@media (max-width:979px){
 .client-master-layout-v124 .detailgrid{
  grid-template-columns:minmax(0,1fr) !important;
 }
 .client-master-layout-v124 .client-right-column-v125,
 .client-master-layout-v124 .detailgrid>.card:first-child{
  grid-column:1 !important;
  grid-row:auto !important;
  min-width:0 !important;
  height:auto !important;
 }
}

/* v140 - compact client master: sidebar already provides Clientes navigation.
   Keep touch targets usable and the two-column layout intact. */
.client-master-layout-v124 .client-master-top-actions:empty{display:none}
.client-master-layout-v124 .detailgrid{gap:10px;margin-bottom:10px}
.client-master-layout-v124 .client-identity-v124{padding:10px 12px}
.client-master-layout-v124 .client-identity-v124 .pagehead{margin-bottom:8px}
.client-master-layout-v124 .client-identity-v124 .pagehead h1{
 font-size:clamp(18px,1.45vw,22px);
 line-height:1.2;
}
.client-master-layout-v124 .client-identity-v124 .pagehead p{font-size:14px;line-height:1.3}
.client-master-layout-v124 .client-right-column-v125{gap:8px}
.client-master-layout-v124 .client-right-column-v125>.card:last-child{
 padding:10px 12px;
}
.client-master-layout-v124 .client-contact-v124{
 display:grid;
 grid-template-columns:repeat(2,minmax(0,1fr));
 gap:6px;
}
.client-master-layout-v124 .client-contact-v124 .btn,
.client-master-layout-v124 .client-contact-v124 button,
.client-master-layout-v124 .client-contact-v124 a{
 min-width:0;
 min-height:36px;
 padding:7px 8px;
 font-size:14px;
 line-height:1.25;
 box-sizing:border-box;
 text-align:center;
 overflow-wrap:anywhere;
}
.client-master-layout-v124 .detailgrid>.card:first-child{
 padding:12px 14px !important;
}
.client-master-layout-v124 .detailgrid>.card:first-child h3{margin-bottom:8px}
.client-master-layout-v124 .detailgrid>.card:first-child dl{
 grid-template-columns:minmax(135px,.48fr) minmax(0,1fr);
 gap:6px 12px;
 margin-bottom:8px;
}
.client-master-layout-v124 .detailgrid>.card:first-child dt,
.client-master-layout-v124 .detailgrid>.card:first-child dd{
 font-size:14px;
 line-height:1.4;
}
.client-master-actions-v123 .client-data-actions-v123{
 margin-top:8px;
 padding-top:8px;
 gap:6px;
}
.client-master-actions-v123 .client-data-actions-v123 .btn,
.client-master-actions-v123 .client-data-actions-v123 button,
.client-master-actions-v123 .client-data-actions-v123 a{
 min-height:36px;
 padding:7px 10px;
 font-size:14px;
}
@media(max-width:979px){
 .client-master-layout-v124 .detailgrid>.card:first-child dl{
  grid-template-columns:minmax(115px,.42fr) minmax(0,1fr);
 }
}
@media(max-width:520px){
 .client-master-layout-v124 .detailgrid>.card:first-child dl{grid-template-columns:1fr}
 .client-master-layout-v124 .client-contact-v124{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* Hide empty duplicate contact actions area; keep Drive when available. */
.client-master-layout-v124 .client-contact-v124:empty{display:none}

/* v141 - Two-card client master: Summary | Datos del cliente.
   No third identity card, no fixed minimum widths, no clipped actions. */
.client-master-layout-v124 .detailgrid{
 display:grid;
 grid-template-columns:minmax(220px,.32fr) minmax(0,1fr) !important;
 gap:12px;
 align-items:start;
 width:100%;
}
.client-master-layout-v124 .detailgrid>.card{
 min-width:0 !important;
 max-width:100%;
 box-sizing:border-box;
 height:auto !important;
 grid-row:1 !important;
 padding:16px !important;
}
.client-master-layout-v124 .detailgrid>.card:first-child{
 grid-column:2 !important;grid-row:1 !important;
 padding-right:16px !important;
}
.client-master-layout-v124 .detailgrid>.card:nth-child(2){
 grid-column:1 !important;grid-row:1 !important;
}
.client-master-layout-v124 .client-data-identity-v141{
 min-width:0;
 padding:0 0 12px;
 margin-bottom:12px;
 border-bottom:1px solid var(--line);
}
.client-master-layout-v124 .client-data-identity-v141 .pagehead{
 margin:0;
 padding:0;
 min-width:0;
}
.client-master-layout-v124 .client-data-identity-v141 .pagehead h1{
 font-size:clamp(20px,1.75vw,27px);
 line-height:1.2;
 margin:0 0 3px;
 overflow-wrap:anywhere;
}
.client-master-layout-v124 .client-data-identity-v141 .pagehead p{
 font-size:13px;
 line-height:1.4;
 margin:0;
}
.client-master-layout-v124 .detailgrid>.card:first-child h3{margin:0 0 10px;font-size:18px;}
.client-master-layout-v124 .detailgrid>.card:nth-child(2) h3{margin:0 0 10px;font-size:18px;}
.client-master-layout-v124 .detailgrid>.card:nth-child(2) dl{
 display:grid;
 grid-template-columns:minmax(100px,.95fr) minmax(0,1fr);
 gap:7px 10px;
 margin-bottom:0;
}
.client-master-layout-v124 .detailgrid>.card:nth-child(2) dt,
.client-master-layout-v124 .detailgrid>.card:nth-child(2) dd{
 font-size:14px;line-height:1.35;
}
.client-master-layout-v124 .detailgrid>.card:first-child .client-data-actions-v123{
 position:static !important;
 display:flex;flex-wrap:wrap;gap:8px;
 max-width:100%;
}
@media(max-width:979px){
 .client-master-layout-v124 .detailgrid{grid-template-columns:minmax(0,1fr) !important}
 .client-master-layout-v124 .detailgrid>.card:first-child,
 .client-master-layout-v124 .detailgrid>.card:nth-child(2){
  grid-column:1 !important;
  grid-row:auto !important;
 }
 .client-master-layout-v124 .detailgrid>.card:first-child{order:1}
 .client-master-layout-v124 .detailgrid>.card:nth-child(2){order:2}
}
@media(max-width:520px){
 .client-master-layout-v124 .detailgrid>.card{padding:12px !important}
 .client-master-layout-v124 .detailgrid>.card:nth-child(2) dl{grid-template-columns:minmax(90px,.8fr) minmax(0,1fr)}
}

/* v142: friendly, compact vertical client master. Datos first; Resumen below. */
.client-master-layout-v124 .detailgrid{
 display:flex !important;
 flex-direction:column;
 gap:10px;
 width:100%;
 align-items:stretch;
}
.client-master-layout-v124 .detailgrid>.card:first-child,
.client-master-layout-v124 .detailgrid>.card:nth-child(2){
 order:initial;
 grid-column:auto !important;
 grid-row:auto !important;
 width:100%;
 max-width:100%;
 min-width:0 !important;
 height:auto !important;
 box-sizing:border-box;
 padding:14px 16px !important;
}
.client-master-layout-v124 .client-data-identity-v141{
 margin-bottom:8px;
 padding-bottom:8px;
}
.client-master-layout-v124 .client-data-identity-v141 .pagehead h1{
 font-size:clamp(20px,1.65vw,25px);
}
.client-master-layout-v124 .detailgrid>.card:first-child dl{
 display:grid;
 grid-template-columns:minmax(140px, .27fr) minmax(0, 1fr);
 gap:5px 12px;
 margin:0 0 8px;
}
.client-master-layout-v124 .detailgrid>.card:nth-child(2){
 padding:10px 14px !important;
}
.client-master-layout-v124 .detailgrid>.card:nth-child(2) dl{
 display:grid;
 grid-template-columns:repeat(4,minmax(0,1fr));
 gap:8px;
 margin:0;
}
.client-master-layout-v124 .detailgrid>.card:nth-child(2) dt,
.client-master-layout-v124 .detailgrid>.card:nth-child(2) dd{
 margin:0;
 font-size:13px;
}
.client-master-layout-v124 .detailgrid>.card:nth-child(2) dl dt{
 font-weight:700;
}
.client-master-layout-v124 .detailgrid>.card:nth-child(2) dl dd{
 margin-bottom:4px;
}
.client-master-layout-v124 .detailgrid>.card:nth-child(2) h3{
 font-size:17px;
 margin:0 0 8px;
}
.client-master-actions-v123 .client-data-actions-v123{
 margin-top:8px;
 padding-top:8px;
 display:grid !important;
 grid-template-columns:repeat(2,minmax(0,1fr));
}
.client-master-actions-v123 .client-data-actions-v123 .btn,
.client-master-actions-v123 .client-data-actions-v123 button,
.client-master-actions-v123 .client-data-actions-v123 a{
 width:100% !important;
 min-height:36px;
}
@media(max-width:700px){
 .client-master-layout-v124 .detailgrid>.card:first-child dl{
  grid-template-columns:minmax(110px,.35fr) minmax(0,1fr);
 }
 .client-master-layout-v124 .detailgrid>.card:nth-child(2) dl{
  grid-template-columns:repeat(2,minmax(0,1fr));
 }
}
@media(max-width:520px){
 .client-master-layout-v124 .detailgrid>.card:first-child dl{grid-template-columns:1fr}
 .client-master-actions-v123 .client-data-actions-v123{grid-template-columns:1fr}
}

/* v143: restrained rectangular cards instead of oversized rounded blocks. */
.client-master-layout-v124 .detailgrid>.card{
 border-radius:8px !important;
 box-shadow:0 1px 3px rgba(15,23,42,.07);
}
.client-master-layout-v124 .detailgrid>.card .btn,
.client-master-layout-v124 .detailgrid>.card button,
.client-master-layout-v124 .detailgrid>.card a.btn{
 border-radius:6px !important;
}
.client-master-layout-v124 .detailgrid>.card:nth-child(2) dl{
 display:grid;
 grid-template-columns:max-content minmax(0,1fr) max-content minmax(0,1fr);
 gap:6px 10px;
 align-items:baseline;
}
@media(max-width:980px){
 .client-master-layout-v124 .detailgrid>.card:nth-child(2) dl{
  grid-template-columns:max-content minmax(0,1fr);
 }
}
@media(max-width:560px){
 .client-master-layout-v124 .detailgrid>.card:nth-child(2) dl{
  grid-template-columns:minmax(0,max-content) minmax(0,1fr);
 }
}

/* v144 - Two paired field columns inside Datos del cliente; Resumen stays below. */
.client-master-layout-v124 .detailgrid>.card:first-child dl{
 display:grid;
 grid-template-columns:repeat(2,minmax(0,1fr));
 gap:10px 20px;
 align-items:start;
 margin:0 0 10px;
}
.client-master-layout-v124 .client-master-field-v144{
 min-width:0;
 display:flex;
 flex-direction:column;
 gap:3px;
}
.client-master-layout-v124 .client-master-field-v144>dt{
 font-weight:700;
 font-size:13px;
 line-height:1.25;
 color:#66758b;
 margin:0;
}
.client-master-layout-v124 .client-master-field-v144>dd{
 margin:0;
 font-size:14px;
 line-height:1.35;
 min-width:0;
 overflow-wrap:anywhere;
}
.client-master-layout-v124 .client-master-contact-field-v144{
 grid-column:1 / -1;
}
.client-master-layout-v124 .client-master-contact-field-v144 .contact-compact{
 display:grid;
 grid-template-columns:repeat(3,minmax(0,1fr));
 gap:8px 14px;
}
.client-master-layout-v124 .client-master-contact-field-v144 .contact-compact>div{
 min-width:0;
 overflow-wrap:anywhere;
}
@media(max-width:800px){
 .client-master-layout-v124 .client-master-contact-field-v144 .contact-compact{
  grid-template-columns:repeat(2,minmax(0,1fr));
 }
}
@media(max-width:600px){
 .client-master-layout-v124 .detailgrid>.card:first-child dl{
  grid-template-columns:1fr;
  gap:8px;
 }
 .client-master-layout-v124 .client-master-contact-field-v144 .contact-compact{
  grid-template-columns:1fr;
 }
}

/* v145 - Fit the complete client profile into a single compact information card.
   Two detail columns, one contact strip, and compact actions without clipping. */
.client-master-layout-v124 .detailgrid>.card:first-child{
 padding:12px 14px !important;
}
.client-master-layout-v124 .client-data-identity-v141{
 padding-bottom:6px;
 margin-bottom:8px;
}
.client-master-layout-v124 .client-data-identity-v141 .pagehead h1{
 font-size:21px;
 line-height:1.2;
 margin-bottom:2px;
}
.client-master-layout-v124 .client-data-identity-v141 .pagehead p{
 font-size:12px;
}
.client-master-layout-v124 .detailgrid>.card:first-child h3{
 margin:0 0 8px;
 font-size:17px;
}
.client-master-layout-v124 .detailgrid>.card:first-child dl{
 grid-template-columns:repeat(2,minmax(0,1fr));
 gap:7px 16px;
 margin-bottom:6px;
}
.client-master-layout-v124 .client-master-field-v144{
 gap:2px;
}
.client-master-layout-v124 .client-master-contact-field-v144 .contact-compact{
 grid-template-columns:repeat(3,minmax(0,1fr));
 gap:6px 12px;
}
.client-master-layout-v124 .client-master-contact-field-v144 .contact-compact>div{
 font-size:13px;
 line-height:1.3;
}
.client-master-layout-v124 .detailgrid>.card:first-child>a.btn{
 display:inline-flex;
 min-height:34px;
 padding:6px 10px;
 margin-top:2px;
 font-size:13px;
}
.client-master-actions-v123 .client-data-actions-v123{
 display:grid !important;
 grid-template-columns:repeat(4,minmax(0,1fr));
 gap:6px;
 padding-top:7px;
 margin-top:7px;
}
.client-master-actions-v123 .client-data-actions-v123 .btn,
.client-master-actions-v123 .client-data-actions-v123 button,
.client-master-actions-v123 .client-data-actions-v123 a{
 min-width:0;
 min-height:36px;
 font-size:13px;
 padding:6px;
}
@media(max-width:1050px){
 .client-master-actions-v123 .client-data-actions-v123{
  grid-template-columns:repeat(2,minmax(0,1fr));
 }
}
@media(max-width:800px){
 .client-master-layout-v124 .client-master-contact-field-v144 .contact-compact{
  grid-template-columns:repeat(2,minmax(0,1fr));
 }
}
@media(max-width:600px){
 .client-master-layout-v124 .detailgrid>.card:first-child dl{grid-template-columns:1fr}
 .client-master-layout-v124 .client-master-contact-field-v144 .contact-compact{grid-template-columns:1fr}
 .client-master-actions-v123 .client-data-actions-v123{grid-template-columns:1fr}
}

/* v146: user-specified desktop reference: 36.6 cm wide, 7 cm tall.
   Keep all client data reachable if font scaling or unusually long values require overflow. */
@media(min-width:1200px){
 .client-master-layout-v124 .detailgrid{
  width:min(100%,36.6cm);
  max-width:36.6cm;
  margin-inline:auto;
 }
 .client-master-layout-v124 .detailgrid>.card:first-child{
  width:100%;
  height:7cm !important;
  min-height:7cm;
  max-height:7cm;
  padding:9px 12px !important;
  overflow-x:hidden;
  overflow-y:auto;
  scrollbar-gutter:stable;
 }
 .client-master-layout-v124 .client-data-identity-v141{
  padding-bottom:4px;
  margin-bottom:5px;
 }
 .client-master-layout-v124 .client-data-identity-v141 .pagehead h1{
  font-size:19px;
  line-height:1.12;
 }
 .client-master-layout-v124 .client-data-identity-v141 .pagehead p{
  font-size:11px;
  line-height:1.15;
 }
 .client-master-layout-v124 .detailgrid>.card:first-child h3{
  margin-bottom:4px;
  font-size:15px;
 }
 .client-master-layout-v124 .detailgrid>.card:first-child dl{
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:4px 12px;
  margin-bottom:4px;
 }
 .client-master-layout-v124 .client-master-field-v144{
  display:grid;
  grid-template-columns:minmax(95px,.35fr) minmax(0,1fr);
  gap:4px;
  align-items:baseline;
 }
 .client-master-layout-v124 .client-master-field-v144>dt,
 .client-master-layout-v124 .client-master-field-v144>dd{
  font-size:12px;
  line-height:1.2;
 }
 .client-master-layout-v124 .client-master-contact-field-v144{
  display:block;
  grid-column:1/-1;
 }
 .client-master-layout-v124 .client-master-contact-field-v144>dt{margin-bottom:3px}
 .client-master-layout-v124 .client-master-contact-field-v144 .contact-compact{
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:4px 9px;
 }
 .client-master-layout-v124 .client-master-contact-field-v144 .contact-compact>div{
  font-size:12px;
  line-height:1.2;
 }
 .client-master-layout-v124 .detailgrid>.card:first-child>a.btn{
  min-height:29px;
  padding:4px 8px;
  font-size:12px;
 }
 .client-master-actions-v123 .client-data-actions-v123{
  grid-template-columns:repeat(4,minmax(0,1fr));
  margin-top:4px;
  padding-top:4px;
  gap:4px;
 }
 .client-master-actions-v123 .client-data-actions-v123 .btn,
 .client-master-actions-v123 .client-data-actions-v123 button,
 .client-master-actions-v123 .client-data-actions-v123 a{
  min-height:30px;
  font-size:12px;
  padding:4px;
 }
}
@media(max-width:1199px){
 .client-master-layout-v124 .detailgrid{
  width:100%;
  max-width:100%;
 }
 .client-master-layout-v124 .detailgrid>.card:first-child{
  height:auto !important;
  max-height:none;
  overflow:visible;
 }
}

/* v147 - true compact client data layout, not merely smaller fonts.
   The SPA adds client-data-compact-v147 after grouping fields. */
.client-master-layout-v124 .detailgrid>.card.client-data-compact-v147{
 display:flex !important;
 flex-direction:column !important;
 gap:5px !important;
 width:100%;
 max-width:100%;
 box-sizing:border-box;
 padding:9px 12px !important;
}
.client-master-layout-v124 .client-data-compact-v147 .client-data-identity-v141{
 padding:0 0 4px !important;
 margin:0 0 2px !important;
}
.client-master-layout-v124 .client-data-compact-v147 .client-data-identity-v141 .pagehead h1{
 font-size:19px !important;
 line-height:1.1 !important;
 margin:0 0 2px !important;
}
.client-master-layout-v124 .client-data-compact-v147 .client-data-identity-v141 .pagehead p{
 font-size:11px !important;
 margin:0 !important;
}
.client-master-layout-v124 .client-data-compact-v147 > h3{
 font-size:15px !important;
 line-height:1.1;
 margin:0 0 1px !important;
}
.client-master-layout-v124 .client-data-compact-v147 > dl{
 display:grid !important;
 grid-template-columns:repeat(2,minmax(0,1fr)) !important;
 gap:4px 12px !important;
 margin:0 !important;
 min-width:0;
}
.client-master-layout-v124 .client-data-compact-v147 .client-master-field-v144:not(.client-contact-strip-v147){
 display:flex !important;
 flex-direction:row !important;
 flex-wrap:nowrap;
 align-items:baseline;
 gap:6px;
 padding:1px 0;
 min-width:0;
}
.client-master-layout-v124 .client-data-compact-v147 .client-master-field-v144:not(.client-contact-strip-v147)>dt{
 flex:0 0 112px;
 font-size:12px !important;
 line-height:1.2 !important;
 white-space:normal;
}
.client-master-layout-v124 .client-data-compact-v147 .client-master-field-v144:not(.client-contact-strip-v147)>dd{
 flex:1 1 auto;
 font-size:12px !important;
 line-height:1.2 !important;
 min-width:0;
 overflow-wrap:anywhere;
}
.client-master-layout-v124 .client-data-compact-v147 .client-contact-strip-v147{
 display:block !important;
 grid-column:1 / -1 !important;
 margin:0 0 3px;
 min-width:0;
}
.client-master-layout-v124 .client-data-compact-v147 .client-contact-strip-v147 .contact-compact{
 display:grid !important;
 grid-template-columns:repeat(3,minmax(0,1fr)) !important;
 gap:4px 10px !important;
 min-width:0;
}
.client-master-layout-v124 .client-data-compact-v147 .client-contact-strip-v147 .contact-compact>div{
 min-width:0;
 font-size:12px !important;
 line-height:1.15 !important;
 overflow-wrap:anywhere;
}
.client-master-layout-v124 .client-data-compact-v147 > a.btn{
 margin:0 !important;
 padding:4px 7px !important;
 min-height:28px !important;
 width:max-content;
 max-width:100%;
 align-self:flex-start;
 font-size:12px !important;
}
.client-master-layout-v124 .client-data-compact-v147 .client-data-actions-v123{
 display:grid !important;
 grid-template-columns:repeat(4,minmax(0,1fr)) !important;
 gap:5px !important;
 margin:2px 0 0 !important;
 padding:5px 0 0 !important;
 position:static !important;
 max-width:100%;
}
.client-master-layout-v124 .client-data-compact-v147 .client-data-actions-v123 .btn,
.client-master-layout-v124 .client-data-compact-v147 .client-data-actions-v123 button,
.client-master-layout-v124 .client-data-compact-v147 .client-data-actions-v123 a{
 min-width:0 !important;
 min-height:30px !important;
 padding:4px !important;
 font-size:12px !important;
 line-height:1.15;
}
@media(min-width:1200px){
 .client-master-layout-v124 .detailgrid>.card.client-data-compact-v147{
  height:7cm !important;
  min-height:0 !important;
  max-height:7cm !important;
  overflow-y:auto;
  overflow-x:hidden;
 }
}
@media(max-width:1199px){
 .client-master-layout-v124 .detailgrid>.card.client-data-compact-v147{
  height:auto !important;
  max-height:none !important;
 }
}
@media(max-width:820px){
 .client-master-layout-v124 .client-data-compact-v147 > dl{grid-template-columns:1fr !important}
 .client-master-layout-v124 .client-data-compact-v147 .client-contact-strip-v147 .contact-compact{grid-template-columns:1fr !important}
 .client-master-layout-v124 .client-data-compact-v147 .client-data-actions-v123{grid-template-columns:repeat(2,minmax(0,1fr)) !important}
}
@media(max-width:520px){
 .client-master-layout-v124 .client-data-compact-v147 .client-master-field-v144:not(.client-contact-strip-v147){flex-wrap:wrap}
 .client-master-layout-v124 .client-data-compact-v147 .client-data-actions-v123{grid-template-columns:1fr !important}
}

/* v148: maintain the original contact DD and its links in the compact strip. */
.client-master-layout-v124 .client-data-compact-v147 .client-contact-strip-v147 > dd.client-contact-values-v148{
 display:block !important;
 width:100%;
 min-width:0;
 margin:0 !important;
}
.client-master-layout-v124 .client-data-compact-v147 .client-contact-strip-v147 > dd.client-contact-values-v148 .contact-compact{
 display:grid !important;
 grid-template-columns:repeat(3,minmax(0,1fr)) !important;
 gap:6px 12px !important;
}
@media(max-width:820px){
 .client-master-layout-v124 .client-data-compact-v147 .client-contact-strip-v147 > dd.client-contact-values-v148 .contact-compact{
  grid-template-columns:1fr !important;
 }
}

/* v149: substitute icons in the exact location of each text label. */
.client-master-layout-v124 .client-data-compact-v147 .client-channel-row-v149{
 display:flex !important;
 align-items:center;
 gap:6px;
 min-width:0;
}
.client-master-layout-v124 .client-data-compact-v147 .client-channel-icon-v149{
 display:inline-flex;
 flex:0 0 20px;
 width:20px;
 height:20px;
 align-items:center;
 justify-content:center;
}
.client-master-layout-v124 .client-data-compact-v147 .client-channel-row-v149 a{
 min-width:0;
 overflow-wrap:anywhere;
 font-size:12px;
 line-height:1.25;
}
.client-master-layout-v124 .client-data-compact-v147 .client-contact-strip-v147 > dd.client-contact-values-v148 .contact-compact{
 grid-template-columns:repeat(3,minmax(0,1fr)) !important;
 gap:5px 12px !important;
}
@media(max-width:820px){
 .client-master-layout-v124 .client-data-compact-v147 .client-contact-strip-v147 > dd.client-contact-values-v148 .contact-compact{
  grid-template-columns:1fr !important;
 }
}

/* v150: icons occupy the original label position, immediately before the value. */
.client-master-layout-v124 .client-data-compact-v147 .client-contact-strip-v147 .contact-compact>div.client-master-channel-v150,
.client-master-layout-v124 .client-data-compact-v147 .client-contact-strip-v147>dd .contact-compact>div.client-master-channel-v150{
 display:flex !important;
 flex-direction:row !important;
 justify-content:flex-start !important;
 align-items:center !important;
 gap:6px !important;
 width:100%;
 min-width:0;
}
.client-master-layout-v124 .client-master-channel-icon-v150{
 display:inline-flex;
 flex:0 0 20px;
 width:20px;
 height:20px;
 align-items:center;
 justify-content:center;
}
.client-master-layout-v124 .client-master-channel-icon-v150 svg{
 width:17px;height:17px;display:block;
}
.client-master-layout-v124 .client-master-channel-phone-v150,
.client-master-layout-v124 .client-master-channel-email-v150{color:#176bd2}
.client-master-layout-v124 .client-master-channel-wa-v150{color:#14894d}
.client-master-layout-v124 .client-master-channel-v150>a{
 display:inline-block;
 flex:1 1 auto;
 min-width:0;
 overflow-wrap:anywhere;
 font-size:12px;
 line-height:1.3;
}

/* v151: normalize both old cached labels and current markup into a compact icon/value row. */
.client-master-layout-v124 .client-data-compact-v147 .contact-compact>.client-channel-final-v151,
.client-master-layout-v124 .client-data-compact-v147 .client-contact-strip-v147 .contact-compact>.client-channel-final-v151{
 display:flex !important;
 flex-direction:row !important;
 align-items:center !important;
 justify-content:flex-start !important;
 gap:6px !important;
 min-width:0;
 width:100%;
}
.client-master-layout-v124 .client-channel-final-icon-v151{
 display:inline-flex;
 align-items:center;
 justify-content:center;
 flex:0 0 20px;
 width:20px;
 height:20px;
}
.client-master-layout-v124 .client-channel-final-phone-v151,
.client-master-layout-v124 .client-channel-final-email-v151{color:#176bd2}
.client-master-layout-v124 .client-channel-final-wa-v151{color:#14894d}
.client-master-layout-v124 .client-channel-final-v151 a{
 flex:1 1 auto;
 min-width:0;
 font-size:12px;
 line-height:1.3;
 overflow-wrap:anywhere;
}

/* v152: CLIENT PROFILE ONLY - each linked icon occupies the old label position.
   Never target .cm-case-header-contacts or any case detail module. */
.client-master-layout-v124 .detailgrid>.card.client-data-compact-v147 .client-contact-strip-v147 .contact-compact{
 display:grid !important;
 grid-template-columns:repeat(3,minmax(0,1fr)) !important;
 gap:8px 12px !important;
}
.client-master-layout-v124 .client-contact-strip-v147 .contact-compact>a.client-profile-contact-link-v152{
 display:inline-flex !important;
 flex-flow:row nowrap !important;
 align-items:center !important;
 justify-content:flex-start !important;
 gap:6px !important;
 text-decoration:none;
 min-width:0;
 max-width:100%;
 font-size:13px;
 line-height:1.25;
}
.client-master-layout-v124 .client-profile-contact-link-v152:hover .client-profile-contact-value-v152{
 text-decoration:underline;
}
.client-master-layout-v124 .client-profile-contact-icon-v152{
 display:inline-flex;
 flex:0 0 22px;
 width:22px;
 height:22px;
 align-items:center;
 justify-content:center;
}
.client-master-layout-v124 .client-profile-contact-icon-v152 svg{
 display:block;width:18px;height:18px;
}
.client-master-layout-v124 .client-profile-contact-phone-v152 .client-profile-contact-icon-v152,
.client-master-layout-v124 .client-profile-contact-email-v152 .client-profile-contact-icon-v152{color:#176bd2}
.client-master-layout-v124 .client-profile-contact-wa-v152 .client-profile-contact-icon-v152{color:#14894d}
.client-master-layout-v124 .client-profile-contact-value-v152{
 display:inline-block;
 min-width:0;
 overflow-wrap:anywhere;
}
@media(max-width:820px){
 .client-master-layout-v124 .detailgrid>.card.client-data-compact-v147 .client-contact-strip-v147 .contact-compact{
  grid-template-columns:1fr !important;
 }
}
