/* AquaFlow V34.2.58 — Order / Delivery / Customer unified entity UI
   One customer identity language across the three operational workspaces. */
#orders,#deliveries,#customers{
  --odc-line:#d7e5f0;
  --odc-text:#143653;
  --odc-muted:#6d8296;
  --odc-blue:#0878ef;
  --odc-blue-soft:#eaf4ff;
  --odc-green:#0a9b6b;
  --odc-green-soft:#e9f8f1;
}

/* Shared customer identity interaction inside Order and Delivery cards. */
#orders .customer-entity-link-v34258,
#deliveries .customer-entity-link-v34258{
  display:inline-flex!important;
  align-items:center!important;
  gap:5px!important;
  min-width:0!important;
  max-width:100%!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  color:var(--odc-text)!important;
  font:inherit!important;
  font-weight:950!important;
  line-height:1.15!important;
  text-align:left!important;
  cursor:pointer!important;
}
#orders .customer-entity-link-v34258:hover,
#deliveries .customer-entity-link-v34258:hover{color:var(--odc-blue)!important}
#orders .customer-entity-link-v34258:focus-visible,
#deliveries .customer-entity-link-v34258:focus-visible{outline:2px solid #7dbbf5!important;outline-offset:3px!important;border-radius:7px!important}
#orders .customer-entity-link-v34258 .entity-link-arrow-v34258,
#deliveries .customer-entity-link-v34258 .entity-link-arrow-v34258{flex:0 0 auto;color:#88a1b5;font-size:.72em;font-weight:950}

/* Contact line is now identical in hierarchy on order and delivery cards. */
#orders .order-ux-customer-copy-v34213 .entity-contact-v34258,
#deliveries .delivery-customer-copy-v34225 .entity-contact-v34258{
  display:block!important;
  min-width:0!important;
  max-width:100%!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  color:var(--odc-muted)!important;
  font-size:11px!important;
  line-height:1.3!important;
  font-weight:650!important;
}

/* Customer directory now uses the same card anatomy: avatar / identity / money / chevron. */
#customers #customer-list{
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  gap:10px!important;
}
#customers .compact-customer-card.customer-entity-card-v34258{
  position:relative!important;
  overflow:hidden!important;
  min-width:0!important;
  border:1px solid var(--odc-line)!important;
  border-radius:18px!important;
  background:#fff!important;
  box-shadow:0 4px 14px rgba(25,62,91,.045)!important;
}
#customers .compact-customer-card.customer-entity-card-v34258:before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:4px;
  background:var(--odc-blue);
}
#customers .customer-enterprise-summary-v34258{
  display:grid!important;
  grid-template-columns:44px minmax(0,1fr) auto 26px!important;
  align-items:center!important;
  gap:10px!important;
  width:100%!important;
  min-width:0!important;
  min-height:76px!important;
  padding:11px 11px 11px 16px!important;
  border:0!important;
  background:#fff!important;
  color:var(--odc-text)!important;
  text-align:left!important;
  cursor:pointer!important;
}
#customers .customer-enterprise-summary-v34258 .avatar{
  display:grid!important;
  place-items:center!important;
  width:44px!important;
  height:44px!important;
  border-radius:13px!important;
  background:var(--odc-blue-soft)!important;
  color:var(--odc-blue)!important;
  font-size:18px!important;
  font-weight:950!important;
}
#customers .customer-enterprise-copy-v34258{
  display:grid!important;
  gap:3px!important;
  min-width:0!important;
}
#customers .customer-enterprise-copy-v34258>strong{
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  color:var(--odc-text)!important;
  font-size:17px!important;
  line-height:1.15!important;
  font-weight:950!important;
}
#customers .customer-enterprise-copy-v34258>small{
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  color:var(--odc-muted)!important;
  font-size:11px!important;
  line-height:1.25!important;
  font-weight:650!important;
}
#customers .customer-enterprise-money-v34258{
  display:grid!important;
  justify-items:end!important;
  gap:2px!important;
  min-width:0!important;
  white-space:nowrap!important;
}
#customers .customer-enterprise-money-v34258>strong{color:var(--odc-text)!important;font-size:14px!important;line-height:1.1!important;font-weight:950!important}
#customers .customer-enterprise-money-v34258>small{color:var(--odc-muted)!important;font-size:9px!important;line-height:1.1!important;font-weight:850!important}
#customers .customer-enterprise-money-v34258.has-debt>strong{color:#c72e3c!important}
#customers .customer-entity-card-v34258.is-expanded .customer-enterprise-summary-v34258{background:#f8fbfe!important;border-bottom:1px solid #e3edf3!important}
#customers .customer-entity-card-v34258 .customer-card-chevron{width:26px!important;height:26px!important;border-radius:9px!important}

/* Explicit cross-workspace links inside the customer profile. */
#customers .customer-linked-workspaces-v34258{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:7px!important;
}
#customers .customer-linked-workspaces-v34258 button{
  min-width:0!important;
  min-height:38px!important;
  border:1px solid #cfe0ec!important;
  border-radius:11px!important;
  background:#f7fbfe!important;
  color:#27506f!important;
  font-size:11px!important;
  line-height:1.15!important;
  font-weight:900!important;
  cursor:pointer!important;
}
#customers .customer-linked-workspaces-v34258 button:first-child{border-color:#b9d9f4!important;background:#edf7ff!important;color:#0874dc!important}
#customers .customer-linked-workspaces-v34258 button:last-child{border-color:#bfe6d6!important;background:#effaf5!important;color:#087a58!important}

/* Keep the same density on staff/admin mobile; never turn customer cards into 2 columns. */
@media(max-width:980px){
  body.unified-shell.staff-mode #customers #customer-list,
  body.staff-mode #customers #customer-list,
  body.management-mode #customers #customer-list{grid-template-columns:minmax(0,1fr)!important;gap:9px!important}
  #customers .customer-enterprise-summary-v34258{grid-template-columns:44px minmax(0,1fr) auto 24px!important;gap:9px!important;min-height:74px!important;padding:10px 10px 10px 15px!important}
}
@media(max-width:390px){
  #customers .customer-enterprise-summary-v34258{grid-template-columns:42px minmax(0,1fr) auto 22px!important;gap:8px!important}
  #customers .customer-enterprise-summary-v34258 .avatar{width:42px!important;height:42px!important}
  #customers .customer-enterprise-copy-v34258>strong{font-size:16px!important}
  #customers .customer-enterprise-money-v34258>strong{font-size:13px!important}
}
