/* Keep long card text inside its own slot. Actions and status badges never shrink. */
.ref-page .ref-card,
.ref-page .client-card,
.ref-page .ref-trip{min-width:0;max-width:100%;box-sizing:border-box;overflow:hidden}
.client-card .client-card-heading{display:flex;align-items:center;gap:9px;width:100%;min-width:0}
.client-card .client-card-heading>.overflow-marquee{display:block;flex:1 1 0;min-width:0;font-size:14px;line-height:1.3}
.client-card .client-card-heading>.pill{flex:0 0 auto;white-space:nowrap}
.client-card>p{max-width:100%;overflow-wrap:anywhere}
.client-card .ref-client-road{display:flex;align-items:center;gap:8px;min-width:0;width:100%}
.client-card .ref-client-road>span{flex:1 1 0;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.client-card .ref-client-road>b{flex:0 0 auto;white-space:nowrap}
.client-card .ref-next{display:flex;align-items:center;gap:8px;width:100%;min-width:0}
.client-card .ref-next>.overflow-marquee{display:block;flex:1 1 0;min-width:0}
.client-card .ref-next>.text-link{display:inline-flex;align-items:center;justify-content:flex-end;gap:3px;flex:0 0 auto;max-width:42%;white-space:nowrap;font-size:10px}
.ref-trip .trip-card-top{display:flex;align-items:center;gap:8px;width:100%;min-width:0}
.ref-trip .trip-card-top>.overflow-marquee{display:block;flex:1 1 0;min-width:0}
.ref-trip .trip-card-top>.pill{flex:0 0 auto;max-width:44%;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ref-trip .trip-driver-row{display:flex;align-items:center;gap:8px;width:100%;min-width:0}
.ref-trip .trip-driver-row>.overflow-marquee{display:block;flex:1 1 0;min-width:0}
.ref-trip .trip-driver-row>small:last-child{flex:0 0 auto;white-space:nowrap}
.overflow-marquee{display:block;position:relative;min-width:0;max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.overflow-marquee>span{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.overflow-marquee.is-overflowing>span{display:inline-block;max-width:none;overflow:visible;text-overflow:clip;width:max-content;animation:fleetflow-card-marquee 9s ease-in-out 1s infinite alternate}
@keyframes fleetflow-card-marquee{from{transform:translateX(0)}to{transform:translateX(calc(-1 * var(--marquee-distance,0px)))}}
.overflow-marquee:hover>span,.overflow-marquee:focus-within>span{animation-play-state:paused}
@media(prefers-reduced-motion:reduce){.overflow-marquee.is-overflowing>span{animation:none;max-width:100%;overflow:hidden;text-overflow:ellipsis}}
@media(max-width:380px){.client-card .ref-next>.text-link{max-width:40%;font-size:9px}.ref-trip .trip-card-top>.pill{max-width:42%;font-size:10px;padding-left:7px;padding-right:7px}}
/* Client card contact row: keep the action readable and reserve its own column. */
.client-card .client-card-contact{display:grid;grid-template-columns:minmax(0,1fr) 112px;align-items:center;gap:10px;width:100%;min-width:0}
.client-card .client-card-contact>.client-card-email{display:block;min-width:0;max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:12px;line-height:18px}
.client-card .client-card-contact>.text-link{display:inline-flex;flex:0 0 112px;width:112px;max-width:none;min-width:112px;align-items:center;justify-content:flex-end;gap:4px;white-space:nowrap;overflow:visible;font-size:12px;line-height:18px}
.client-card .client-card-contact>.text-link svg{width:16px;height:16px;flex:0 0 16px}
@media(max-width:360px){.client-card .client-card-contact{grid-template-columns:minmax(0,1fr) 104px;gap:6px}.client-card .client-card-contact>.text-link{width:104px;min-width:104px;flex-basis:104px;font-size:11px}}
/* Driver directory card: align the avatar with the driver's name, not the full metadata block. */
.driver-card-lockup{align-items:flex-start}
.driver-card-lockup>.driver-card-avatar{align-self:flex-start;flex:0 0 36px;margin-top:0}
.driver-card-lockup>.record-main{min-width:0;flex:1}