/* B2B catalogue, insights and map components use the existing CRM theme tokens. */
.crm-search-input{flex:1 1 15rem;width:auto;min-width:0}.crm-compact-select{flex:0 1 14rem;width:auto}
.crm-ranking{display:grid;gap:1rem}.crm-ranking-row{display:grid;grid-template-columns:minmax(10rem,1fr) minmax(5rem,2fr) minmax(5rem,auto);gap:1rem;align-items:center}.crm-ranking-row>button{white-space:normal;overflow-wrap:anywhere;color:var(--crm-user-main-text,var(--crm-shell-text))}.crm-ranking-row>button:disabled{opacity:1}.crm-ranking-row>strong{text-align:right;font-variant-numeric:tabular-nums}.crm-ranking-track{height:.7rem;border-radius:1rem;background:var(--crm-user-page-bg,#edf1f5);overflow:hidden}.crm-ranking-track>span{display:block;height:100%;background:var(--bs-primary,#2563eb);border-radius:inherit;min-width:0}
.crm-map-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(18rem,23rem);gap:1rem;align-items:start}.crm-map-layout>*{min-width:0}.crm-operations-map{height:65vh;min-height:24rem;border:1px solid var(--crm-border,#dfe3e8);border-radius:.75rem;background:var(--crm-user-page-bg,#eef2f6)}.crm-location-list{max-height:65vh;overflow:auto}.crm-location-row{display:flex;flex-direction:column;gap:.3rem;text-align:left;width:100%;padding:1rem;margin-bottom:.5rem;border:1px solid var(--crm-border,#dfe3e8);border-radius:.5rem;background:var(--crm-user-card-bg,#fff);color:var(--crm-user-main-text,#172b4d);overflow-wrap:anywhere}.crm-location-row.is-selected{border-color:var(--bs-primary,#2563eb);box-shadow:inset 3px 0 0 var(--bs-primary,#2563eb)}.crm-location-row>span,.crm-location-row>small{color:var(--crm-user-muted-text,#64748b)}.crm-map-pin{display:grid;place-items:center;width:36px;height:36px;border:2px solid #fff;border-radius:50%;font:700 14px system-ui;color:#fff;background:#2563eb;box-shadow:0 2px 6px #0004}.crm-map-pin-warehouse{background:#15803d;border-radius:6px}.crm-map-pin-supplier{background:#7e22ce;border-radius:10px}.crm-map-pin-cluster{width:42px;height:42px;background:#334155}.crm-map-pin-preview{background:#b45309}.crm-map-cluster-list{max-height:15rem;overflow:auto}
.crm-progress-details>summary{display:none}.crm-progress-details:not([open])>summary{display:block}.crm-progress-details>summary{cursor:pointer;font-weight:600;color:var(--bs-primary,#2563eb);padding:.5rem 0}.crm-progress-details[open]>summary{margin-bottom:.5rem}
@media(min-width:768px){.crm-progress-details>summary{display:none!important}}
@media(max-width:991.98px){.crm-map-layout{grid-template-columns:minmax(0,1fr)}.crm-operations-map{height:52vh;min-height:20rem}.crm-location-list{max-height:45vh}}
@media(max-width:767.98px){
 .content-wrapper,.content-inner,.content{min-width:0;max-width:100%}.content{padding:1rem!important}.crm-page-heading{padding:1rem!important;gap:.75rem!important}.crm-page-heading .page-title{line-height:1.3}.crm-page-subtitle{max-width:none!important;line-height:1.5!important}
 .content .card{margin-bottom:1rem}.content .card-body,.content .card-header,.content .card-footer{padding:1rem}.content .card-header{gap:.75rem;flex-wrap:wrap}.content .card-header>div{min-width:0;max-width:100%}.content .card-header>.d-flex{width:100%}.content .row.g-4{--bs-gutter-x:1rem;--bs-gutter-y:1rem}.content .mb-4{margin-bottom:1rem!important}.content .form-control,.content .form-select{min-height:44px;font-size:16px}.content .btn{min-height:44px;display:inline-flex;align-items:center;justify-content:center;white-space:normal;gap:.35rem}.content .form-check-input{min-width:1.15rem;min-height:1.15rem}.content .card-title{line-height:1.4}.content .d-flex>input,.content .d-flex>select{min-width:0}.crm-search-input,.crm-compact-select{flex:1 1 100%;width:100%}
 .crm-progress-details>summary{display:block}.crm-product-journey{padding:.85rem}.crm-product-journey-meta{gap:.5rem;flex-wrap:wrap}.crm-product-stage-track{margin-top:.75rem}.crm-order-current-stage-box{width:100%;padding:.65rem;background:var(--crm-user-page-bg,#f8fafc);border-radius:.5rem}.crm-order-current-stage-box strong{font-size:1rem}
 .crm-ranking-row{grid-template-columns:minmax(0,1fr) auto;gap:.35rem .75rem}.crm-ranking-track{grid-column:1/-1;grid-row:2}.crm-ranking-row>strong{font-size:.8rem}.crm-ranking-row>button{min-height:44px!important}.crm-map-layout .btn{flex:1 1 auto}.crm-operations-map{min-height:19rem;height:48vh}
 .table-responsive:has(>.crm-mobile-records){overflow:visible}.crm-mobile-records{display:block;width:100%;min-width:0!important}.crm-mobile-records>thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.crm-mobile-records>tbody{display:block}.crm-mobile-records>tbody>tr{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);padding:.75rem;gap:.65rem;border-bottom:1px solid var(--crm-border,#dfe3e8)}.crm-mobile-records>tbody>tr>td{display:flex;flex-direction:column;align-items:flex-start;min-width:0;padding:0!important;border:0!important;text-align:left!important;white-space:normal!important;overflow-wrap:anywhere}.crm-mobile-records>tbody>tr>td::before{content:attr(data-label);display:block;font-size:.68rem;color:var(--crm-user-muted-text,#64748b);margin-bottom:.2rem;font-weight:600}.crm-mobile-records>tbody>tr>td:first-child,.crm-mobile-records>tbody>tr>td:last-child{grid-column:1/-1}.crm-mobile-records>tbody>tr>td:last-child{flex-direction:row;flex-wrap:wrap;gap:.5rem}.crm-mobile-records>tbody>tr>td:last-child::before{flex-basis:100%}.crm-mobile-records>tbody>tr.crm-table-message{display:block}.crm-mobile-records>tbody>tr.crm-table-message>td::before{display:none}.crm-mobile-records td>.btn{flex:0 1 auto}.crm-mobile-records .form-control{width:100%}.crm-mobile-records [x-show][style*="display: none"]{display:none!important}
}
@media(prefers-reduced-motion:reduce){.crm-ranking-track>span{transition:none}html{scroll-behavior:auto}}

/* Scoped enhancements built on existing Findoly CRM tokens. */
@media(max-width:767.98px){
 .crm-order-stage-actions{position:sticky;bottom:0;z-index:5;margin-inline:-1rem;padding:1rem;gap:.75rem!important;background:var(--crm-user-card-bg,#fff);border-top:1px solid var(--crm-border,#dfe3e8);box-shadow:0 -4px 16px rgba(15,23,42,.06);padding-bottom:max(1rem,env(safe-area-inset-bottom))}
 .crm-order-stage-actions>.btn{min-width:7rem;flex:1 1 0}
 .crm-order-line-table>tbody>tr>td:nth-child(1),.crm-order-line-table>tbody>tr>td:nth-child(4),.crm-order-line-table>tbody>tr>td:nth-child(5){grid-column:1/-1}
 .crm-order-line-table>tbody>tr>td:nth-child(5){justify-content:flex-end}
 .crm-order-line-table .form-control,.crm-order-line-table .form-select{max-width:100%}
 .crm-upload-progress{margin-top:.75rem}
 .crm-sidebar .nav-link,.crm-sidebar-close,.crm-mobile-menu{min-height:44px}
}
@media(max-width:991.98px){
 .crm-filter-card .btn,.crm-filter-card .form-control,.crm-filter-card .form-select{min-height:44px}
}

/* Mobile order wizard: neutralize the shared 18rem flex-basis when the heading stacks. */
@media(max-width:767.98px){
 .crm-order-timeline-card .crm-order-wizard-heading{align-items:flex-start;gap:.75rem}
 .crm-order-timeline-card .crm-order-wizard-heading>:first-child{flex:0 1 auto;width:100%}
 .crm-order-timeline-card .crm-order-step-count{flex:0 0 auto;width:100%;margin-top:0}
}

/* Findoly CRM responsive consistency: scoped overrides of existing shell tokens. */
.content{
 --b2b-space-1:.5rem;
 --b2b-space-2:1rem;
 --b2b-space-3:1.5rem;
 --b2b-space-4:2rem;
}
.content .crm-data-card,.content .crm-dashboard-grid,.content .crm-metric-grid{min-width:0}
.content .crm-data-card .table-responsive{max-width:100%}
.content .crm-data-card .crm-card-heading{gap:var(--b2b-space-2)}
.content .crm-data-card .crm-card-heading>div:first-child{min-width:0}
.content :is(button,a,input,select,textarea):focus-visible,
.crm-topbar :is(button,a):focus-visible,
.crm-sidebar :is(button,a):focus-visible{
 outline:2px solid var(--crm-user-accent,#1877f2);
 outline-offset:2px;
}
.content .crm-empty-state{max-width:100%;overflow-wrap:anywhere}
.content .crm-data-card .card-header .btn{white-space:normal}
@media(min-width:768px) and (max-width:1199.98px){
 .content .crm-data-card .card-header{gap:var(--b2b-space-2)}
 .content .crm-metric-grid{gap:var(--b2b-space-2)}
 .content .row.g-4{--bs-gutter-x:1rem;--bs-gutter-y:1rem}
 .content .card-header>:first-child{min-width:0}
}
@media(max-width:767.98px){
 .content .crm-data-card>.crm-card-heading{min-height:0;gap:var(--b2b-space-1);align-items:flex-start}
 .content .crm-data-card>.crm-card-heading>:first-child{flex:1 1 auto;min-width:0;max-width:100%}
 .content .crm-order-timeline-card>.crm-order-wizard-heading>:first-child{flex:0 1 auto;width:100%}
 .content .crm-order-timeline-card .crm-order-step-count{min-height:0;margin:0;gap:.125rem}
 .content .crm-order-timeline-card .card-body{padding:var(--b2b-space-2)}
 .content .crm-order-timeline-card .crm-order-timeline{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;align-items:start;min-width:0}
 .content .crm-order-timeline-card .crm-order-timeline::before{top:21px;bottom:auto;left:12.5%;right:12.5%;width:auto;height:2px}
 .content .crm-order-timeline-card .crm-order-timeline-step{
   display:flex;flex-direction:column;align-items:center;justify-content:flex-start;
   gap:.5rem;min-width:0;min-height:0;padding:0 .125rem;text-align:center;
 }
 .content .crm-order-timeline-card .crm-order-timeline-node{
   width:44px;height:44px;flex:0 0 44px;font-size:.8rem;
 }
 .content .crm-order-timeline-card .crm-order-timeline-copy{
   align-items:center;min-width:0;max-width:100%;width:100%;
 }
 .content .crm-order-timeline-card .crm-order-timeline-copy strong{
   font-size:clamp(.64rem,2.7vw,.78rem);line-height:1.3;
   letter-spacing:-.015em;white-space:nowrap;
 }
 .content .crm-order-timeline-card .crm-order-timeline-copy small,
 .content .crm-order-timeline-card .crm-order-timeline-copy em{display:none}
 .content .crm-data-card .table-responsive:not(:has(>.crm-mobile-records)){
   overflow-x:auto;max-width:100%;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;
 }
 .content .crm-finance-table{min-width:42rem}
 .content .crm-mobile-records>tbody>tr>td{gap:.125rem}
 .content .crm-mobile-records>tbody>tr>td:first-child{grid-column:1/-1}
 .content .crm-order-stage-actions{bottom:env(safe-area-inset-bottom,0px);box-sizing:border-box}
 .content .crm-order-stage-actions>.btn{min-height:44px}
 .content .crm-page-heading>.crm-primary-action{
   min-height:44px;max-width:100%;font-size:.8125rem;line-height:1.3;
   padding-inline:var(--b2b-space-2);white-space:normal;
 }
 .crm-topbar .crm-mobile-menu,
 .crm-topbar .crm-topbar-icon{width:44px;height:44px;min-width:44px;flex:0 0 44px}
 .crm-topbar .crm-admin-menu{min-height:44px}
 .content .crm-filter-card .crm-filter-actions .btn{min-height:44px}
 .content .crm-data-card .card-footer .btn-group .btn{min-height:44px}
}
@media(max-width:359.98px){
 .crm-topbar .crm-mobile-menu,.crm-topbar .crm-topbar-icon{width:44px;height:44px;flex-basis:44px}
}
@media(prefers-reduced-motion:reduce){
 .crm-order-timeline-card .crm-order-timeline-step,
 .crm-order-stage-actions{scroll-behavior:auto;transition:none}
}
@media(prefers-contrast:more){
 .content :is(button,a,input,select,textarea):focus-visible{outline-width:3px}
 .content .crm-status{border:1px solid currentColor}
}

/* Mobile dashboard table remains inside its own scrolling container. */
@media(max-width:767.98px){.content .crm-dashboard-record-table{min-width:36rem}}

/* Financial ledger tables remain scrollable locally, not across the page. */
@media(max-width:767.98px){
 .content .crm-finance-table{min-width:42rem}
 .content .crm-finance-table th,.content .crm-finance-table td{white-space:nowrap}
}

/* Screenshot regressions B1–B6: keep Alpine x-show visibility authoritative.
   Error banners place Bootstrap display utilities on inner children only. */

/* Navigation is a constrained modal drawer below the existing 992px breakpoint. */
@media(max-width:991.98px){
 .crm-sidebar .crm-sidebar-mobile-head{
  display:flex!important;align-items:center;justify-content:space-between;
  gap:.5rem;min-height:60px;padding:.5rem .75rem;
  background:var(--crm-user-sidebar-background,#fff);
 }
 .crm-sidebar .crm-sidebar-brand{
  display:flex;flex:1 1 auto;align-items:center;gap:.625rem;min-width:0;overflow:hidden;
 }
 .crm-sidebar .crm-sidebar-brand-logo{width:5rem;max-width:5rem;flex:0 0 5rem;height:auto}
 .crm-sidebar .crm-sidebar-mobile-title{
  font-size:.875rem;font-weight:700;line-height:1.3;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
 }
 .crm-sidebar .crm-sidebar-close{
  display:inline-flex;flex:0 0 44px;align-items:center;justify-content:center;
  width:44px;height:44px;padding:0;margin:0;
  border:1px solid var(--crm-user-card-border,var(--crm-shell-border));
  border-radius:10px;background:transparent;color:var(--crm-user-sidebar-text,#475569);
 }
 .crm-sidebar .crm-sidebar-close svg{width:20px;height:20px;flex:0 0 20px}
 .crm-sidebar .crm-sidebar-close:focus-visible{
  outline:2px solid var(--crm-user-accent,#1877f2);outline-offset:2px;
 }
 .crm-sidebar .sidebar-section.pt-2{padding-top:.125rem!important}
 .crm-sidebar .nav-sidebar>.nav-item-header:first-child{margin-top:.5rem!important}
}

/* Dashboard header should fit its real content rather than inherit card flex-bases. */
@media(max-width:767.98px){
 .crm-dashboard-page-header .crm-page-heading{
  min-height:0;align-items:stretch;justify-content:flex-start;
  gap:.75rem!important;padding:1rem!important;
 }
 .crm-dashboard-page-header .crm-page-heading>:first-child{
  flex:0 1 auto;width:100%;min-width:0;
 }
 .crm-dashboard-page-header .crm-page-heading .page-title{margin:0 0 .375rem!important}
 .crm-dashboard-page-header .crm-page-subtitle{margin:0!important;line-height:1.45!important}
 .crm-dashboard-page-header .crm-primary-action{flex:0 0 auto;width:100%}
}

/* x-show controls the inline display state; unlike Bootstrap d-flex, this is not !important. */
.content .crm-conditional-flex{display:flex}
@media(max-width:767.98px){
 .content .crm-data-card>.crm-conditional-flex.card-footer{flex-wrap:wrap;row-gap:.5rem}
}

/* U18–U23: in-page workflow navigation, actionable metrics and filter context. */
.content .crm-section-jump{display:flex;flex-wrap:wrap;gap:var(--b2b-space-1,.5rem);padding:var(--b2b-space-2,1rem);border:1px solid var(--crm-user-card-border,var(--crm-shell-border,#e2e8f0));border-radius:var(--bs-border-radius,.5rem);background:var(--crm-user-card-bg,#fff)}
.content .crm-section-jump a{display:inline-flex;align-items:center;min-height:44px;padding:.5rem .875rem;border:1px solid var(--crm-user-card-border,var(--crm-shell-border,#e2e8f0));border-radius:.5rem;color:var(--crm-user-sidebar-text,var(--bs-body-color));font-weight:600;text-decoration:none;overflow-wrap:anywhere}
.content .crm-section-jump a:hover{background:var(--crm-user-hover-bg,rgba(99,102,241,.08));color:var(--crm-user-accent,#1877f2)}
.content .crm-section-jump a:focus-visible,.content .crm-metric-action:focus-visible,.content .crm-filter-summary .btn:focus-visible{outline:2px solid var(--crm-user-accent,#1877f2);outline-offset:3px}
.content [id^="finance-"],.content [id^="customer-360-"]{scroll-margin-top:6rem}
.content .crm-metric-action{display:inline-flex;align-items:center;gap:.5rem;min-height:44px;margin-top:.5rem;color:var(--crm-user-accent,#1877f2);font-weight:600;text-decoration:underline;text-underline-offset:3px}
.content .crm-filter-summary{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:var(--b2b-space-1,.5rem);padding:.5rem 1rem;border:1px solid var(--crm-user-card-border,var(--crm-shell-border,#e2e8f0));border-radius:.5rem;background:var(--crm-user-card-bg,#fff)}
.content .crm-filter-summary .btn{min-height:44px}
@media(max-width:767.98px){.content .crm-section-jump{padding:var(--b2b-space-1,.5rem)}.content .crm-section-jump a{flex:1 1 auto;justify-content:center}.content .crm-filter-summary{align-items:stretch}.content .crm-filter-summary .btn{width:100%}}

/* U24–U33: compact, lightweight business visuals. Palette is chart-only; CRM surface tokens remain authoritative. */
.content{--crm-chart-blue:#3478d4;--crm-chart-green:#32a17b;--crm-chart-purple:#8766c7;--crm-chart-orange:#e49a47;--crm-chart-red:#de6b72;--crm-chart-track:var(--crm-user-page-bg,#edf1f5)}
.content .crm-workflow-header{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:1rem}.content .crm-workflow-eyebrow{font-size:.72rem;font-weight:700;letter-spacing:.07em;text-transform:uppercase;color:var(--crm-user-accent,#3478d4)}
.content .crm-attention-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,12rem),1fr));gap:1rem}
.content .crm-attention-card{display:flex;flex-direction:column;gap:.4rem;min-width:0;padding:1rem;border:1px solid var(--crm-user-card-border,#e2e8f0);border-left:3px solid var(--crm-attention-color,#3478d4);border-radius:.65rem;background:var(--crm-user-card-bg,#fff);color:var(--crm-user-main-text,var(--bs-body-color));text-decoration:none;overflow-wrap:anywhere}
.content .crm-attention-card:hover{border-color:var(--crm-attention-color,#3478d4);text-decoration:none;color:inherit}.content .crm-attention-card:focus-visible,.content .crm-risk-row:focus-visible,.content .crm-donut-legend-row a:focus-visible,.content .crm-chart-text-link:focus-visible{outline:2px solid var(--crm-attention-color,var(--bs-primary,#3478d4));outline-offset:3px}
.content .crm-attention-card>strong{font-size:clamp(1.2rem,2vw,1.6rem);font-weight:750;letter-spacing:-.03em;font-variant-numeric:tabular-nums;color:var(--crm-attention-color,#3478d4)}.content .crm-attention-card>b{font-size:.78rem;margin-top:auto;color:var(--crm-attention-color,#3478d4)}.content .crm-attention-tag{font-size:.68rem;font-weight:700;text-transform:uppercase;letter-spacing:.05em}
.content .crm-soft-blue{--crm-attention-color:#3478d4}.content .crm-soft-green{--crm-attention-color:#218965}.content .crm-soft-purple{--crm-attention-color:#8766c7}.content .crm-soft-orange{--crm-attention-color:#ba751e}.content .crm-soft-red{--crm-attention-color:#b34e54}
.content .crm-visual-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;align-items:stretch}.content .crm-visual-grid>*{min-width:0}.content .crm-visual-card{min-width:0;background:var(--crm-user-card-bg,#fff)}.content .crm-visual-card .card-header{gap:1rem}
.content .crm-spark-chart{display:grid;grid-template-columns:repeat(14,minmax(0,1fr));min-height:13rem;gap:.3rem;align-items:end}.content .crm-spark-day{display:flex;min-width:0;min-height:12.5rem;flex-direction:column;align-items:center;justify-content:end;gap:.25rem}.content .crm-spark-amount{font-size:.61rem;color:var(--crm-user-main-text,var(--bs-body-color));max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.content .crm-spark-track{height:8rem;width:100%;max-width:1.6rem;display:flex;align-items:end;border-radius:.3rem;background:var(--crm-chart-track)}.content .crm-spark-track>span{display:block;width:100%;height:0;border-radius:.3rem .3rem .15rem .15rem;background:var(--crm-chart-blue)}.content .crm-spark-day:nth-child(3n) .crm-spark-track>span{background:var(--crm-chart-green)}.content .crm-spark-day:nth-child(4n) .crm-spark-track>span{background:var(--crm-chart-purple)}.content .crm-spark-day small{font-size:.61rem;line-height:1.1;text-align:center;color:var(--crm-user-main-text,var(--bs-body-color))}
.content .crm-donut-layout{display:grid;grid-template-columns:minmax(8rem, .8fr) minmax(0,1.2fr);gap:1.3rem;align-items:center}.content .crm-donut-wrap{display:flex;justify-content:center}.content .crm-donut{display:grid;place-items:center;width:min(100%,12rem);aspect-ratio:1;border-radius:50%;background:var(--crm-chart-track)}.content .crm-donut>span{display:flex;flex-direction:column;align-items:center;justify-content:center;width:67%;height:67%;border-radius:50%;background:var(--crm-user-card-bg,#fff);color:var(--crm-user-main-text,var(--bs-body-color))}.content .crm-donut strong{font-size:1.4rem;font-variant-numeric:tabular-nums}.content .crm-donut small{font-size:.75rem}
.content .crm-donut-legend{min-width:0;display:grid;gap:.45rem}.content .crm-donut-legend-row{display:grid;grid-template-columns:.5rem minmax(0,1fr) auto auto;align-items:center;gap:.5rem;min-height:32px;min-width:0;font-size:.78rem}.content .crm-donut-legend-row>span:nth-child(2){overflow-wrap:anywhere}.content .crm-donut-legend-row>a{display:inline-flex;min-height:44px;align-items:center;color:var(--crm-user-accent,#3478d4)}.content .crm-chart-dot{width:.5rem;height:.5rem;border-radius:100%}
.content .crm-comparison-list,.content .crm-inventory-mix,.content .crm-aging-list{display:grid;gap:1rem}.content .crm-comparison-row{min-width:0}.content .crm-comparison-meta,.content .crm-aging-label{display:flex;flex-wrap:wrap;justify-content:space-between;gap:.5rem;align-items:center;margin-bottom:.3rem;font-size:.78rem}.content .crm-comparison-meta>*{min-width:0;overflow-wrap:anywhere}.content .crm-comparison-meta small,.content .crm-aging-label small{color:var(--crm-user-muted-text,#64748b)}
.content .crm-comparison-track{width:100%;height:.65rem;border-radius:1rem;overflow:hidden;background:var(--crm-chart-track)}.content .crm-comparison-track>span{display:block;min-width:0;height:100%;border-radius:1rem}.content .crm-chart-text-link{display:inline-flex;align-items:center;min-height:44px;font-size:.78rem;color:var(--crm-user-accent,#3478d4)}
.content .crm-risk-list{display:grid;gap:.5rem}.content .crm-risk-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:.75rem;min-height:44px;border:1px solid var(--crm-user-card-border,#e2e8f0);border-radius:.5rem;padding:.65rem .8rem;color:var(--crm-user-main-text,var(--bs-body-color));text-decoration:none}.content .crm-risk-row>span:first-child{display:grid;gap:.2rem;min-width:0}.content .crm-risk-row small{color:var(--crm-user-muted-text,#64748b)}.content .crm-risk-row:hover{border-color:var(--crm-user-accent,#3478d4);text-decoration:none}
.content .crm-aging-row{min-width:0}.content .crm-stock-exceptions{border-top:1px solid var(--crm-user-card-border,#e2e8f0);padding-top:1rem}
@media(max-width:991.98px){.content .crm-visual-grid{grid-template-columns:1fr}.content .crm-donut-layout{grid-template-columns:minmax(8rem,1fr) minmax(0,2fr)}}
@media(max-width:575.98px){.content .crm-attention-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:.5rem}.content .crm-attention-card{padding:.75rem;min-height:9rem}.content .crm-attention-card>strong{font-size:1.2rem}.content .crm-donut-layout{grid-template-columns:1fr}.content .crm-spark-chart{gap:.15rem}.content .crm-spark-amount{display:none}.content .crm-spark-day small{font-size:.52rem;writing-mode:vertical-rl;transform:rotate(180deg);max-height:2.4rem}.content .crm-risk-row{grid-template-columns:minmax(0,1fr) auto}.content .crm-risk-row>span:last-child{display:none}}
@media(prefers-reduced-motion:reduce){.content .crm-comparison-track>span,.content .crm-spark-track>span{transition:none}}

/* Keyboard focus for the chart's per-day value descriptions. */
.content .crm-spark-day:focus-visible{outline:2px solid var(--crm-user-accent,#3478d4);outline-offset:2px;border-radius:.35rem}

/* N1–N4: mobile navigation shell. Match Bootstrap's <=991.98px drawer boundary. */
@media(max-width:991.98px){
  .crm-topbar.navbar-static{position:sticky;top:0;z-index:1040;overflow:visible}
  .crm-topbar .crm-mobile-menu{display:inline-flex;min-width:44px;min-height:44px;flex:0 0 44px}
  .crm-sidebar.sidebar-main{z-index:1060!important}
  .crm-sidebar-overlay{z-index:1055!important}
  html{scroll-padding-top:4.5rem}
}

/* U34–U41: responsive workflow actions; no new themes. */
@media(max-width:767.98px){.content .crm-filter-actions{display:flex;flex-wrap:wrap;gap:.5rem}.content .crm-data-card>.crm-card-heading>.d-flex{max-width:100%}.content .crm-data-card>.crm-card-heading .btn{min-height:44px}}

/* U35/U36/U39/U42/U43: lightweight information hierarchy and state clarity. */
.content .crm-dashboard-details{min-width:0}.content .crm-dashboard-details>summary{cursor:pointer;min-height:44px;display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:.65rem 1rem;border:1px solid var(--crm-user-card-border,#dbe2ea);border-radius:.6rem;background:var(--crm-user-card-bg,#fff);color:var(--crm-user-main-text,#1f2937);font-weight:600}.content .crm-dashboard-details>summary:focus-visible{outline:2px solid var(--crm-user-accent,#3478d4);outline-offset:2px}.content .crm-dashboard-details[open]>summary{margin-bottom:1rem}.content .crm-dashboard-shortcuts>summary{margin:0 1rem 1rem}.content .crm-work-queue-empty{padding:1rem;border:1px dashed var(--crm-user-card-border,#dbe2ea);border-radius:.6rem;color:var(--crm-user-muted-text,#64748b);background:var(--crm-user-card-bg,#fff)}.content .crm-attention-card[style*="display: none"]{display:none!important}
@media(max-width:575.98px){.content .crm-dashboard-details>summary{min-height:48px}.content .crm-work-queue-empty{grid-column:1/-1}}

/* Sales Leads: reuse CRM tokens and mobile record table transform. */
.content.crm-sales-leads .crm-attention-card{min-height:7rem}
.content.crm-sales-leads .crm-data-card .list-group-item{overflow-wrap:anywhere;background:var(--crm-user-card-bg,var(--bs-body-bg));color:var(--crm-user-main-text,var(--bs-body-color));border-color:var(--crm-user-card-border,var(--bs-border-color))}
.content.crm-sales-leads .crm-data-card .list-group-item strong{overflow-wrap:anywhere}
.content.crm-sales-leads button:focus-visible,.content.crm-sales-leads a:focus-visible{outline:2px solid var(--crm-user-accent,#3478d4);outline-offset:2px}
@media(max-width:767.98px){
  .content.crm-sales-leads .btn{min-height:44px}
  .content.crm-sales-leads .crm-table-actions{white-space:normal}
  .content.crm-sales-leads .crm-table-actions>.btn{width:100%}
  .content.crm-sales-leads .crm-attention-card{min-height:7.5rem}
}


/* Optional lead entry and delivery controls preserve Findoly spacing and theme. */
.content .crm-lead-optional-summary{cursor:pointer;min-height:44px;padding:.75rem 1rem;border:1px solid var(--crm-user-card-border,#dbe2ea);border-radius:.5rem;background:var(--crm-user-card-bg,#fff);color:var(--crm-user-main-text,var(--bs-body-color));font-weight:600}
.content .crm-lead-optional-summary:focus-visible{outline:2px solid var(--crm-user-accent,#3478d4);outline-offset:2px}
@media(max-width:767.98px){
.content .crm-delivery-stage-actions{position:sticky;bottom:env(safe-area-inset-bottom,0px);z-index:5;display:flex;align-items:center;flex-wrap:wrap;gap:.5rem;margin-inline:-1rem;padding:1rem;padding-bottom:max(1rem,env(safe-area-inset-bottom));background:var(--crm-user-card-bg,#fff);border-top:1px solid var(--crm-user-card-border,#dfe3e8);box-shadow:0 -4px 16px rgba(15,23,42,.06)}
.content .crm-delivery-stage-actions>.btn{min-height:44px;flex:1 1 auto}
.content .crm-delivery-stage-actions>.text-end{flex:1 1 auto}
.content .crm-delivery-stage-actions>.text-end>.btn{min-height:44px;width:100%}
.content .crm-pricing-records .crm-table-actions{white-space:normal}
.content .crm-pricing-records .crm-table-actions .btn{min-height:44px;min-width:44px;margin:.125rem}
}

/* Table-first record lists: preserve real table semantics and local horizontal scrolling on phones. */
@media(max-width:767.98px){
 .content .table-responsive:has(>table.crm-mobile-records){overflow-x:auto;max-width:100%;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
 .content .table-responsive>table.crm-mobile-records{display:table;min-width:47.5rem!important;width:100%}
 .content table.crm-mobile-records>thead{position:static;display:table-header-group;width:auto;height:auto;overflow:visible;clip-path:none;white-space:normal}
 .content table.crm-mobile-records>tbody{display:table-row-group}
 .content table.crm-mobile-records>tbody>tr,.content table.crm-mobile-records>tbody>tr.crm-table-message{display:table-row;padding:0;border:0}
 .content table.crm-mobile-records>tbody>tr>td,.content table.crm-mobile-records>tbody>tr>td:first-child,.content table.crm-mobile-records>tbody>tr>td:last-child{display:table-cell;grid-column:auto;min-width:0;padding:.75rem!important;border:0;border-bottom:1px solid var(--crm-border,#dfe3e8)!important;vertical-align:middle;white-space:normal!important;overflow-wrap:anywhere}
 .content table.crm-mobile-records>tbody>tr>td::before,.content table.crm-mobile-records>tbody>tr>td:last-child::before{display:none}
 /* All record columns, including the first one, move together horizontally. */
 .content table.crm-mobile-records th:first-child,.content table.crm-mobile-records td:first-child{min-width:8.5rem}
 .content table.crm-mobile-records .crm-table-actions{white-space:normal}
 .content table.crm-mobile-records .crm-table-actions .btn{min-height:44px;min-width:44px;margin:.125rem}
 .content .crm-table-page-size .form-select{width:auto;min-width:5rem;min-height:44px}
}
@media(min-width:768px){.content .crm-table-page-size .form-select{width:auto;min-width:5rem}}

/* Selected map records keep a visible selected state in table mode. */
.content .crm-location-table tr.is-selected>td{background:var(--crm-user-page-bg,#edf1f5);box-shadow:inset 0 2px 0 var(--crm-user-accent,#2563eb)}
@media(max-width:767.98px){.content .crm-location-table{min-width:40rem!important}}
