/* Six targeted refinements: use the existing ALA light/dark tokens. */
html[data-ala-design="v2"][data-ala-theme] body.premium-ui-v2 #properties#properties .properties-toolbar{display:grid!important;grid-template-columns:minmax(240px,2fr) repeat(3,minmax(150px,1fr))!important;gap:14px!important;align-items:end!important;width:100%;box-sizing:border-box}
html[data-ala-design="v2"][data-ala-theme] body.premium-ui-v2 #properties#properties .properties-toolbar>label{display:grid!important;gap:6px!important;min-width:0!important;align-self:end!important;font-size:13px!important;font-weight:650!important;line-height:1.4!important;margin:0!important;color:var(--ala-text-secondary)!important}
html[data-ala-design="v2"][data-ala-theme] body.premium-ui-v2 #properties#properties .properties-toolbar :is(input,select){height:44px!important;min-height:44px!important;box-sizing:border-box!important;margin:0!important;width:100%!important;min-width:0!important;font-size:14px!important}
html[data-ala-design="v2"][data-ala-theme] body.premium-ui-v2 #properties#properties .property-search-wrap{height:44px!important;min-height:44px!important;box-sizing:border-box!important;align-self:end!important}
html[data-ala-design="v2"][data-ala-theme] body.premium-ui-v2 #pipeline#pipeline #board{gap:18px!important;align-items:start!important;contain:layout style}
html[data-ala-design="v2"][data-ala-theme] body.premium-ui-v2 #pipeline#pipeline .opp-stage{min-width:300px!important;max-width:324px!important;flex:0 0 310px!important;background:var(--ala-elevated)!important;border:1px solid var(--ala-border)!important;border-radius:14px!important;box-shadow:none!important;overflow:visible!important}
html[data-ala-design="v2"][data-ala-theme] body.premium-ui-v2 #pipeline#pipeline .opp-stage-head{background:var(--ala-elevated)!important;border-radius:14px 14px 0 0!important;border-top:4px solid var(--ala-cta)!important;padding:14px!important;min-height:84px!important;box-sizing:border-box!important}
html[data-ala-design="v2"][data-ala-theme] body.premium-ui-v2 #pipeline#pipeline [data-opportunity-stage="Cerrada ganada"] .opp-stage-head{border-top-color:var(--ala-success)!important}
html[data-ala-design="v2"][data-ala-theme] body.premium-ui-v2 #pipeline#pipeline [data-opportunity-stage="Cerrada perdida"] .opp-stage-head{border-top-color:var(--ala-error)!important}
html[data-ala-design="v2"][data-ala-theme] body.premium-ui-v2 #pipeline#pipeline [data-opportunity-stage="Nutrición/Seguimiento"] .opp-stage-head{border-top-color:var(--ala-info)!important}
html[data-ala-design="v2"][data-ala-theme] body.premium-ui-v2 #pipeline#pipeline .opp-stage-top h3{font-size:15px!important;line-height:1.4!important;color:var(--ala-text)!important;white-space:normal!important;font-weight:750!important}
html[data-ala-design="v2"][data-ala-theme] body.premium-ui-v2 #pipeline#pipeline .opp-stage-count{font-size:13px!important;background:var(--ala-selected)!important;color:var(--ala-selected-text)!important;min-width:28px!important;min-height:28px!important}
html[data-ala-design="v2"][data-ala-theme] body.premium-ui-v2 #pipeline#pipeline .opp-stage-total{font-size:13px!important;color:var(--ala-text-secondary)!important;margin-top:7px!important;font-variant-numeric:tabular-nums}
html[data-ala-design="v2"][data-ala-theme] body.premium-ui-v2 #pipeline#pipeline .opp-stage-cards{padding:10px!important;min-height:120px;overflow-anchor:none}
html[data-ala-design="v2"][data-ala-theme] body.premium-ui-v2 #pipeline#pipeline .opp-card{background:var(--ala-card)!important;border:1px solid var(--ala-border)!important;border-radius:10px!important;padding:14px!important;margin-bottom:12px!important;box-shadow:0 2px 5px #15232908!important;transform:none!important;transition:border-color .12s ease,box-shadow .12s ease!important}
html[data-ala-design="v2"][data-ala-theme] body.premium-ui-v2 #pipeline#pipeline .opp-card-name{font-size:16px!important;line-height:1.4!important;font-weight:750!important;color:var(--ala-text)!important;white-space:normal!important;overflow-wrap:anywhere!important;text-overflow:clip!important}
html[data-ala-design="v2"][data-ala-theme] body.premium-ui-v2 #pipeline#pipeline :is(.opp-card-contact,.opp-card-invest span,.opp-card-owner,.opp-card-open-hint,.opp-next-deadline){font-size:12px!important;line-height:1.5!important;color:var(--ala-text-secondary)!important}
html[data-ala-design="v2"][data-ala-theme] body.premium-ui-v2 #pipeline#pipeline :is(.opp-card-meta-row,.opp-card-meta-row strong,.opp-card-invest b){font-size:13px!important;line-height:1.5!important;color:var(--ala-text)!important}
html[data-ala-design="v2"][data-ala-theme] body.premium-ui-v2 #pipeline#pipeline .opp-card-meta-row strong{white-space:normal!important;overflow-wrap:anywhere!important;max-width:160px!important}
html[data-ala-design="v2"][data-ala-theme] body.premium-ui-v2 #pipeline#pipeline .opp-card :is(button,select){min-height:36px!important;font-size:13px!important}
html[data-ala-design="v2"][data-ala-theme] body.premium-ui-v2 #pipeline#pipeline .opp-card-menu-btn{min-width:36px!important;min-height:36px!important}
html[data-ala-design="v2"][data-ala-theme] body.premium-ui-v2 #pipeline#pipeline .opp-card-head{grid-template-columns:minmax(0,1fr) 36px!important}
html[data-ala-design="v2"][data-ala-theme] body.premium-ui-v2 #pipeline#pipeline .opp-card-heading{grid-column:1!important;grid-row:1!important}
html[data-ala-design="v2"][data-ala-theme] body.premium-ui-v2 #pipeline#pipeline .opp-card-menu-btn{grid-column:2!important;grid-row:1!important}
html[data-ala-design="v2"][data-ala-theme] body.premium-ui-v2 #pipeline#pipeline .opp-card-invest{grid-column:1/-1!important;text-align:left!important;display:flex!important;gap:8px!important;align-items:baseline!important}
html[data-ala-design="v2"][data-ala-theme] body.premium-ui-v2 #pipeline#pipeline .opp-dragging{opacity:.75!important;border-color:var(--ala-focus)!important;box-shadow:0 0 0 2px var(--ala-focus)!important}
html[data-ala-design="v2"][data-ala-theme] body.premium-ui-v2 #pipeline#pipeline .opp-drop-target{outline:3px solid var(--ala-focus)!important;outline-offset:3px!important;background:var(--ala-selected)!important}
html[data-ala-design="v2"][data-ala-theme] body.premium-ui-v2 #leads#leads .ala-contact-table :is(td,th){padding:14px 12px!important;line-height:1.55!important;vertical-align:top!important}
html[data-ala-design="v2"][data-ala-theme] body.premium-ui-v2 #leads#leads .ala-contact-name{font-size:16px!important;font-weight:750!important;line-height:1.5!important;color:var(--ala-text)!important;white-space:normal!important;text-align:left!important;min-height:36px!important;overflow-wrap:anywhere!important}
html[data-ala-design="v2"][data-ala-theme] body.premium-ui-v2 #leads#leads .ala-contact-primary{font-size:14px!important;line-height:1.55!important;color:var(--ala-text)!important}
html[data-ala-design="v2"][data-ala-theme] body.premium-ui-v2 #leads#leads .ala-contact-meta{font-size:12.5px!important;line-height:1.6!important;color:var(--ala-text-secondary)!important;margin-top:4px!important;white-space:normal!important}
.ala-bulk-dialog{box-sizing:border-box;width:min(780px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto;border:1px solid var(--ala-border,#d9e2e2);border-radius:14px;background:var(--ala-surface,#fff);color:var(--ala-text,#152329);padding:22px;font:inherit}
.ala-bulk-dialog::backdrop{background:var(--ala-overlay,#10223888)}
.ala-bulk-dialog header,.ala-bulk-dialog footer{display:flex;gap:12px;align-items:center;justify-content:space-between;flex-wrap:wrap}
.ala-bulk-dialog h3{margin:0;font-size:21px}.ala-bulk-dialog p{line-height:1.6;font-size:14px}.ala-bulk-dialog label{display:block;font-size:14px;line-height:1.6;margin:12px 0}
.ala-bulk-dialog :is(input:not([type=checkbox]),select,textarea){box-sizing:border-box;width:100%;padding:11px;font:inherit;min-height:44px;border:1px solid var(--ala-control-border,#75888f);border-radius:8px;background:var(--ala-input,#fff);color:inherit}.ala-bulk-dialog textarea{min-height:140px;resize:vertical}
.ala-bulk-dialog .bulk-recipients{max-height:240px;overflow:auto;border:1px solid var(--ala-border,#d9e2e2);border-radius:8px;padding:6px 14px}.ala-bulk-dialog .bulk-recipient{display:flex;align-items:start;gap:10px;padding:8px 0;margin:0}.ala-bulk-dialog .bulk-recipient input{min-width:20px;min-height:20px;margin-top:3px}.ala-bulk-dialog small{color:var(--ala-text-secondary,#53646c);font-size:13px}.ala-bulk-dialog .bulk-error{color:var(--ala-error,#a22c35);font-size:14px}.ala-bulk-dialog [hidden]{display:none!important}
.ala-bulk-dialog :is(button,input,textarea,select):focus-visible{outline:3px solid var(--ala-focus,#176b50);outline-offset:3px}
@media(max-width:1100px){html[data-ala-design="v2"][data-ala-theme] body.premium-ui-v2 #properties#properties .properties-toolbar{grid-template-columns:repeat(3,minmax(140px,1fr))!important}.properties-toolbar .ala-property-search{grid-column:1/-1!important}}
@media(max-width:620px){html[data-ala-design="v2"][data-ala-theme] body.premium-ui-v2 #properties#properties .properties-toolbar{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important}.ala-bulk-dialog{padding:16px}.ala-bulk-dialog footer .btn{min-height:44px}}
@media(max-width:360px){html[data-ala-design="v2"][data-ala-theme] body.premium-ui-v2 #properties#properties .properties-toolbar{grid-template-columns:minmax(0,1fr)!important}}
@media(prefers-reduced-motion:reduce){#pipeline .opp-card{transition:none!important}}

/* Urgency labels are not selection. No default highlighted priority/action. */
html[data-ala-design="v2"][data-ala-theme][data-ala-revision="r1"] body.premium-ui-v2 :is(#home#home,#focusDialog#focusDialog) .priority-row[data-priority-level]{background:var(--ala-surface)!important}
html[data-ala-design="v2"][data-ala-theme][data-ala-revision="r1"] body.premium-ui-v2 :is(#home#home,#focusDialog#focusDialog) .priority-actions button:first-child{background:transparent!important;color:var(--ala-text)!important;border-color:var(--ala-control-border)!important}
html[data-ala-theme] body .priority-name-link{appearance:none!important;display:inline!important;background:transparent!important;border:0!important;box-shadow:none!important;border-radius:3px!important;color:var(--ala-text)!important;padding:0!important;font:700 14px/1.5 var(--ala-font)!important;text-align:left;cursor:pointer;white-space:normal;overflow-wrap:anywhere}
html[data-ala-theme] body .priority-name-link:hover{text-decoration:underline;text-underline-offset:4px;color:var(--ala-cta)!important}
html[data-ala-theme] body .priority-name-link:focus-visible{outline:2px solid var(--ala-focus)!important;outline-offset:4px}
.bulk-pdf-editor{padding:14px;border:1px solid var(--ala-border);border-radius:10px;margin:12px 0}.bulk-pdf-editor label{display:grid;gap:4px;margin:8px 0}.bulk-pdf-editor textarea{min-height:90px}.bulk-pdf-preview{width:100%;height:400px;border:1px solid var(--ala-border);border-radius:8px}.bulk-result-table{width:100%;border-collapse:collapse;font-size:13px}.bulk-result-table td,.bulk-result-table th{text-align:left;padding:8px;border-bottom:1px solid var(--ala-border)}.bulk-channel-notice{padding:12px;border-radius:8px;background:var(--ala-hover);line-height:1.5}.bulk-campaign-recipient{display:grid;grid-template-columns:22px 1fr;gap:8px;padding:10px 0;border-bottom:1px solid var(--ala-border)}.bulk-campaign-recipient input{width:18px;height:18px}.bulk-confirm-preview{white-space:pre-wrap;padding:12px;background:var(--ala-hover);border-radius:8px}

/* Stage 1 consolidation: presentation only; reuse ALA tokens and existing handlers. */
@layer ala-phase4 {
 html[data-ala-design=v2][data-ala-theme][data-ala-density=compact][data-ala-revision=r1] body.premium-ui-v2 #home#home#home#home {
  & #focusPriorityControls {display:flex!important;align-items:center!important;flex-wrap:wrap!important;gap:8px 16px!important;min-height:38px!important;margin:8px 0!important;padding:0!important}
  & #focusPriorityControls[hidden] {display:none!important}
  & #focusPrioritySummary {flex:0 1 auto!important;margin:0!important;line-height:18px!important}
  & #focusPriorityControls #focusAgendaNotice {flex:0 0 auto!important;margin:0!important;padding:0!important}
  & #focusAgendaNotice .ala-agenda-action {box-sizing:border-box!important;min-height:38px!important;height:38px!important;margin:0!important;padding:7px 10px!important}
  & #focusPriorityControls>label {display:flex!important;align-items:center!important;gap:8px!important;flex:0 0 auto!important;width:auto!important;max-width:100%!important;min-width:0!important;margin:0 0 0 auto!important}
  @media(max-width:750px) {
   & #focusPrioritySummary {flex-basis:100%!important}
   & #focusPriorityControls>label {flex:1 1 280px!important;justify-content:space-between!important}
   & #focusPriorityControls select {flex:0 1 208px!important;min-width:0!important;width:208px!important}
  }
 }
}
html {scrollbar-gutter:stable}
html[data-ala-design="v2"][data-ala-theme][data-ala-revision="r1"] body.premium-ui-v2 #home#home#home#home {
  & .home-workspace {display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:20px;align-items:start;margin-bottom:20px}
  & .home-workspace>.home-v3-grid {grid-template-columns:minmax(0,1fr)!important;margin:0!important;min-width:0}
  & .home-day-kpis {gap:10px!important;background:transparent!important;border:0!important;overflow:visible!important;margin-bottom:22px!important}
  & .home-day-kpi {display:flex!important;align-items:center!important;gap:10px!important;padding:14px!important;min-height:88px!important;border:1px solid var(--ala-border)!important;border-radius:10px!important;background:var(--ala-surface)!important}
  & .home-day-kpi:hover {border-color:var(--ala-control-border)!important;background:var(--ala-hover)!important}
  & .home-day-kpi>.day-icon {display:grid!important;place-items:center;flex:0 0 32px;width:32px;height:32px;border-radius:9px;background:var(--ala-selected)!important;color:var(--ala-selected-text)!important}
  & .day-icon svg {width:19px;height:19px;stroke:currentColor;stroke-width:1.7;fill:none;stroke-linecap:round;stroke-linejoin:round}
  & .home-day-kpi>.day-icon.kpi-overdue {color:var(--ala-error)!important;background:var(--ala-error-bg)!important}
  & .home-day-kpi>.day-icon.kpi-missing {color:var(--ala-warning)!important;background:var(--ala-warning-bg)!important}
  & .home-day-kpi>.day-icon.kpi-contact {color:var(--ala-info)!important;background:var(--ala-info-bg)!important}
  & .home-day-kpi>div {display:grid!important;gap:4px!important;flex:1;min-width:0}
  & .home-day-kpi b {font-weight:600!important;font-size:26px!important;line-height:30px!important;text-align:left;font-variant-numeric:tabular-nums}
  & .home-day-kpi span {font-size:12px!important;line-height:17px!important}
  & .focus-heading {gap:12px!important;flex-wrap:wrap}
  & .focus-heading-copy {display:block!important}
  & .focus-heading-copy p {margin-top:4px!important}
  & .focus-view-switch {gap:18px!important}
  & .priority-toolbar {align-items:end!important;gap:8px!important}
  & .priority-toolbar>span:first-child {flex:1 1 100%!important}
  & .priority-row {grid-template-columns:minmax(0,1fr) max-content!important;gap:6px 16px!important;padding:16px!important;min-height:112px!important}
  & .priority-person {grid-column:1!important;grid-row:1!important;flex-direction:row!important;align-items:baseline!important;flex-wrap:wrap!important;gap:8px!important}
  & .priority-level {margin:0!important}
  & .priority-name-link {font-size:15px!important;line-height:22px!important}
  & .priority-copy {grid-column:1!important;grid-row:2!important}
  & .priority-actions {grid-column:2!important;grid-row:1/3!important;padding-right:42px!important;flex-direction:column!important;align-items:flex-end!important;justify-content:center!important;gap:4px!important}
  & .priority-context>summary {grid-column:2!important;grid-row:1/3!important;width:36px!important}
  & .priority-context-body {grid-column:1/-1!important;grid-row:3!important}
  & .home-v3-properties-card {padding:16px!important;min-width:0;background:var(--ala-surface)!important;border:1px solid var(--ala-border)!important;border-radius:12px!important}
  & .home-v3-properties-card .home-v3-card-head {display:block!important;margin-bottom:12px!important}
  & .home-v3-properties-card h3 {font:600 17px/24px var(--ala-font)!important}
  & .home-v3-properties-card .home-v3-card-head p {font-size:12px!important;line-height:18px!important;margin:6px 0!important;color:var(--ala-text-secondary)!important}
  & .home-property-nav {display:flex;align-items:center;gap:6px;justify-content:space-between;margin-top:10px}
  & .home-property-nav .home-v3-link {margin-right:auto}
  & .home-carousel-arrow {flex:0 0 36px;width:36px!important;height:36px!important}
  & .home-v3-properties-card:has(.home-v3-empty) .home-carousel-arrow {display:none!important}
  & .home-featured-properties {display:flex!important;gap:12px!important;overflow-x:auto!important;scroll-snap-type:x proximity;min-height:0!important;padding:0 0 6px!important;scrollbar-width:thin}
  & .home-featured-property {flex:0 0 100%;min-width:0!important;scroll-snap-align:start;box-shadow:none!important;transform:none!important}
  & .home-featured-property-cover {height:auto!important;aspect-ratio:16/10;background:var(--ala-hover)!important}
  & .home-featured-property-cover img {width:100%;height:100%;object-fit:cover}
  & .home-featured-property-cover:after {content:none!important}
  & .home-featured-property-cover.no-image:before {color:var(--ala-text-secondary)!important;font:400 12px/18px var(--ala-font)!important}
  & .home-featured-property-body {padding:12px!important}
  & .home-featured-property-title {font-size:15px!important;line-height:22px!important;font-weight:650!important}
  & .home-featured-property-location {font-size:12px!important;line-height:18px!important;white-space:normal!important}
  & .home-featured-property-btn {height:auto!important;min-height:40px!important;font:600 13px/19px var(--ala-font)!important;background:var(--ala-hover)!important;border-color:var(--ala-border)!important}
  & .home-v3-properties-card .home-v3-empty {padding:12px!important;min-height:0!important;font-size:13px!important;line-height:20px!important;background:var(--ala-hover)!important}
  & #pr6InventoryCard {padding:0!important;margin-bottom:20px!important;background:var(--ala-surface)!important;border:1px solid var(--ala-border)!important;border-radius:12px!important}
  & .home-inventory-summary {padding:14px 16px;cursor:pointer;list-style:none;display:flex;align-items:center;gap:12px;color:var(--ala-text)}
  & .home-inventory-summary::-webkit-details-marker {display:none}
  & .home-inventory-summary:after {content:none!important}
  & .home-inventory-summary strong {font:600 14px/21px var(--ala-font)}
  & .home-inventory-summary span {font-size:12px;color:var(--ala-text-secondary)}
  & .home-inventory-body {padding:0 16px 16px}
  & :is(.home-inventory-summary,.home-day-kpi,.home-featured-property-btn):focus-visible {outline:2px solid var(--ala-focus)!important;outline-offset:3px!important}
}

/* The horizontal board and each vertical column have separate scroll owners. */
html[data-ala-design="v2"][data-ala-theme] body.premium-ui-v2 #pipeline#pipeline #board {overflow:visible!important;align-items:stretch!important}
html[data-ala-design="v2"][data-ala-theme] body.premium-ui-v2 #pipeline#pipeline {
 & #boardScroll {overflow-x:auto!important;overflow-y:hidden!important;max-height:none!important}
 & .opp-stage {overflow:hidden!important;align-self:flex-start;min-height:0!important}
 & .opp-stage-head {position:sticky!important;top:0;z-index:2;flex-shrink:0}
 & .opp-stage-cards {display:block!important;height:var(--ala-column-height,55dvh)!important;min-height:200px!important;max-height:none!important;overflow-y:scroll!important;overflow-x:hidden!important;overscroll-behavior-y:contain;scrollbar-width:auto;scrollbar-color:var(--ala-control-border) var(--ala-surface);scrollbar-gutter:stable;overflow-anchor:none;touch-action:pan-x pan-y}
 & .opp-stage-cards:focus-visible {outline:2px solid var(--ala-focus);outline-offset:-2px}
 & .opp-stage-cards::-webkit-scrollbar {width:12px}
 & .opp-stage-cards::-webkit-scrollbar-thumb {background:var(--ala-control-border);border-radius:4px}
 & .opp-virtual-space {margin:0!important;padding:0!important;border:0!important;pointer-events:none}
 & .opp-column-status {padding:12px 3px;font:400 12px/18px var(--ala-font);color:var(--ala-text-secondary);text-align:center}
}
html[data-ala-design="v2"][data-ala-theme] body.premium-ui-v2 #pipeline#pipeline .opp-list-wrap {max-height:clamp(320px,60dvh,800px);overflow:auto!important;overscroll-behavior:contain;scrollbar-gutter:stable}
html[data-ala-design="v2"][data-ala-theme] body.premium-ui-v2 #pipeline#pipeline .opp-list-wrap table {border-collapse:separate;border-spacing:0;overflow:visible!important}
html[data-ala-design="v2"][data-ala-theme] body.premium-ui-v2 #pipeline#pipeline .opp-list-wrap th {position:sticky!important;top:0!important;z-index:2;background:var(--ala-elevated)!important;box-shadow:0 1px var(--ala-border)}
@media(max-width:1250px) {
 html[data-ala-design="v2"][data-ala-theme][data-ala-revision="r1"] body.premium-ui-v2 #home#home#home#home {
  & .home-workspace {grid-template-columns:minmax(0,1fr)}
  & .home-v3-properties-card .home-v3-card-head {display:flex!important;flex-wrap:wrap;gap:12px}
  & .home-featured-property {flex-basis:260px}
  & .home-day-kpi {padding:12px!important;gap:8px!important}
 }
}
@media(max-width:750px) {
 html[data-ala-design="v2"][data-ala-theme][data-ala-revision="r1"] body.premium-ui-v2 #home#home#home#home {
  & .home-day-kpis {grid-template-columns:repeat(2,minmax(0,1fr))!important}
  & .home-day-kpi:last-child {grid-column:1/-1}
  & .home-day-kpi:last-child>div {display:flex!important;justify-content:space-between!important}
  & .priority-row {grid-template-columns:minmax(0,1fr)!important;gap:8px!important}
  & .priority-actions {grid-column:1!important;grid-row:3!important;flex-direction:row!important;align-items:center!important;justify-content:flex-start!important;flex-wrap:wrap!important;padding-right:44px!important}
  & .priority-context>summary {grid-column:1!important;grid-row:3!important}
  & .priority-context-body {grid-row:4!important}
  & .home-inventory-summary {align-items:start;flex-wrap:wrap;gap:4px 10px}
  & .home-inventory-summary span {flex-basis:80%}
  & .home-featured-property {flex-basis: min(260px,100%)}
 }
}

/* Approved Home composition: priorities + context above a three-project shelf.
   Height changes spacing and images, never the readable type scale. */
html[data-ala-design="v2"][data-ala-theme][data-ala-revision="r1"] body.premium-ui-v2 #home#home#home#home {
 & .home-v3-intro-row {margin-bottom:12px!important;gap:12px!important;min-height:0!important}
 & .home-day-kpis {margin-bottom:12px!important}
 & .home-day-kpi {min-height:70px!important;padding:10px 14px!important}
 & .home-workspace {grid-template-columns:minmax(0,2.5fr) minmax(300px,1fr);gap:12px;align-items:stretch;margin-bottom:12px}
 & .home-v3-bottom-grid {grid-column:1/-1}
 & .home-v3-tasks-card {padding:14px 18px!important;margin:0!important;min-height:0!important}
 & .focus-heading {margin:0 0 8px!important}
 & .focus-view-switch {margin:0!important;padding-bottom:6px!important}
 & .priority-toolbar {margin:6px 0!important;gap:4px 12px!important}
 & .priority-toolbar>span:first-child {flex:1 1 auto!important}
 & #focusPrioritySummary {font-size:12px!important;line-height:18px!important}
 & #focusAgendaNotice {margin:4px 0!important}
 & .priority-row {min-height:84px!important;padding:10px 12px!important;gap:2px 12px!important;margin:0!important}
 & .ala-priority-action {font-size:13px!important;line-height:19px!important}
 & .ala-priority-reason {font-size:12px!important;line-height:18px!important;margin:2px 0 0!important}
 & .home-v3-tasks-card>.home-v3-link {display:none!important}
 & .focus-group-more {margin:6px 0 0!important;padding:4px 0!important}
 & .home-commercial-aside {display:grid;grid-template-rows:auto auto auto;align-content:start;gap:10px;min-width:0}
 & .home-side-panel {border:1px solid var(--ala-border);border-radius:12px;padding:10px 12px;background:var(--ala-surface);min-width:0}
 & .home-side-heading {position:static!important;display:flex;flex-wrap:wrap;gap:8px 12px;align-items:center;justify-content:space-between;margin-bottom:12px;height:auto!important;min-height:36px!important;padding:0!important;border:0!important;background:transparent!important}
 & .home-side-panel h3 {display:flex;gap:7px;align-items:center;font:600 14px/20px var(--ala-font);margin:0;color:var(--ala-text)}
 & .home-side-icon {width:27px;height:27px;display:grid;place-items:center;flex-shrink:0;color:var(--ala-selected-text);background:var(--ala-selected);border-radius:7px}
 & .home-side-icon svg {width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
 & .home-side-panel .home-v3-link {display:inline-flex!important;align-items:center!important;justify-content:center!important;flex:0 0 auto!important;font:600 12px/18px var(--ala-font)!important;white-space:nowrap!important;padding:8px 12px!important;min-height:36px!important;height:auto!important;border:1px solid var(--ala-border)!important;border-radius:8px!important;background:var(--ala-surface)!important;color:var(--ala-text)!important;box-shadow:none!important;margin-left:auto!important}
 & .home-side-panel .home-v3-link:hover:not(:disabled) {background:var(--ala-hover)!important;border-color:var(--ala-control-border)!important}
 & .home-side-panel .home-v3-link:focus-visible {outline:2px solid var(--ala-focus)!important;outline-offset:3px}
 & .home-side-panel .home-v3-link:disabled {opacity:.55;cursor:not-allowed}
 & [data-home-panel="contacts"] .home-side-icon {color:var(--ala-info);background:var(--ala-info-bg)}
 & [data-home-panel="followups"] .home-side-icon {color:var(--ala-chart-3);background:color-mix(in srgb,var(--ala-chart-3) 12%,var(--ala-surface))}
 & .home-side-row {display:flex;align-items:center;gap:10px;width:100%;text-align:left;border:0!important;border-radius:7px;background:transparent!important;color:var(--ala-text)!important;padding:5px 3px!important;min-height:43px;box-shadow:none!important}
 & .home-side-row:hover {background:var(--ala-hover)!important}
 & .home-side-row:focus-visible {outline:2px solid var(--ala-focus);outline-offset:2px}
 & .home-side-copy {display:grid;gap:2px;flex:1;min-width:0}
 & .home-side-copy strong {font:600 13px/18px var(--ala-font);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 & .home-side-copy small {font:400 12px/17px var(--ala-font);color:var(--ala-text-secondary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 & .home-person-avatar {width:32px;height:32px;flex:0 0 32px;border-radius:50%;display:grid;place-items:center;background:var(--ala-selected);color:var(--ala-selected-text);font:600 12px/18px var(--ala-font)}
 & .home-person-avatar {position:relative;overflow:hidden}
 & .home-person-avatar img {position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
 & .home-side-row:nth-child(2) .home-person-avatar {background:var(--ala-info-bg);color:var(--ala-info)}
 & .home-side-row time {display:grid;min-width:52px;font:500 12px/17px var(--ala-font);color:var(--ala-text-secondary)}
 & .home-side-row time b {font-size:14px;color:var(--ala-text);font-variant-numeric:tabular-nums}
 & .home-video-icon {width:18px;height:18px;fill:none;stroke:var(--ala-info);stroke-width:1.7;flex-shrink:0}
 & .home-side-empty {font:400 13px/19px var(--ala-font);color:var(--ala-text-secondary);margin:8px 3px}
 & .home-followup-due {font:500 11px/17px var(--ala-font);color:var(--ala-text-secondary);white-space:nowrap}
 & .home-followup-due.is-overdue {color:var(--ala-warning)}
 & .home-v3-properties-card {padding:12px 16px!important}
 & .home-v3-properties-card .home-v3-card-head {display:flex!important;justify-content:space-between;align-items:center;gap:12px;margin-bottom:10px!important}
 & .home-v3-properties-card .home-v3-card-head p {margin:2px 0 0!important}
 & .home-property-nav {margin:0;gap:8px}
 & .home-featured-properties {gap:16px!important;padding-bottom:0!important;scrollbar-width:none}
 & .home-featured-properties::-webkit-scrollbar {display:none}
 & .home-featured-property {flex:0 0 calc((100% - 32px)/3);border:1px solid var(--ala-border)!important;border-radius:10px;overflow:hidden}
 & .home-featured-property-cover {aspect-ratio:16/9!important;height:auto!important}
 & .home-featured-property-body {padding:10px 12px!important;gap:8px!important}
 & .home-featured-property-title {margin:0!important;font:600 15px/21px var(--ala-font)!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 & .home-featured-property-location,& .home-property-facts {margin:3px 0 0!important;font:400 12px/18px var(--ala-font)!important;color:var(--ala-text-secondary);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
 & .home-property-actions {display:flex;gap:8px;margin-top:8px}
 & .home-featured-property-btn {min-height:34px!important;padding:6px 12px!important;width:auto!important}
 & .home-featured-property-btn:first-child {margin-right:auto}
 & .home-property-position {text-align:center;font:500 12px/16px var(--ala-font);color:var(--ala-text-secondary);margin-top:6px}
 & .home-carousel-arrow:disabled {opacity:.35;cursor:default}
}
html[data-ala-design="v2"][data-ala-theme] body.premium-ui-v2 #pipeline#pipeline {
 & .opp-command-actions {display:flex!important;align-items:center!important;gap:16px!important;flex-wrap:wrap!important}
 & .opp-action-summary {display:flex!important;gap:10px!important;align-items:center!important;flex-shrink:0!important;min-width:0!important;width:auto!important}
 & .opp-action-summary-copy {display:flex!important;flex-direction:column!important;gap:4px!important;align-items:flex-start!important;min-width:0!important}
 & .opp-action-summary-copy>span {font:500 12px/18px var(--ala-font)!important;white-space:nowrap!important}
 & #opportunityTotal {font:650 24px/28px var(--ala-font)!important;display:block!important;margin:0!important;position:static!important;letter-spacing:normal!important}
 & .opp-action-btn {flex-shrink:0!important}
}
@media(max-width:1100px){
 html[data-ala-design="v2"][data-ala-theme][data-ala-revision="r1"] body.premium-ui-v2 #home#home#home#home {
  & .home-workspace {grid-template-columns:minmax(0,1fr)}
  & .home-commercial-aside {grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:auto}
  & .home-side-heading {flex-wrap:wrap}
  & .home-featured-property {flex-basis:calc((100% - 16px)/2)}
 }
}
@media(max-width:750px){
 html[data-ala-design="v2"][data-ala-theme][data-ala-revision="r1"] body.premium-ui-v2 #home#home#home#home {
  & .home-commercial-aside {grid-template-columns:1fr}
  & .home-featured-property {flex-basis:86%}
  & .home-v3-properties-card .home-v3-card-head {flex-wrap:wrap}
  & .home-property-actions {flex-wrap:wrap}
 }
}

/* Remove inherited full-height header/button rules from compact Home content. */
html[data-ala-design="v2"][data-ala-theme][data-ala-revision="r1"] body.premium-ui-v2 #home#home#home#home {
 & .home-v3-tasks-card {background:var(--ala-surface)!important;border:1px solid var(--ala-border)!important;border-radius:12px!important}
 & .home-v3-intro-copy {display:none!important}
 & .home-v3-intro-row {display:block!important;margin:4px 0 8px!important}
 & .home-v3-filters {display:flex!important;align-items:center!important;flex-wrap:wrap!important;gap:8px!important;grid-template-columns:none!important;width:100%!important}
 & .home-filter {display:flex!important;align-items:center!important;gap:6px!important;flex:0 1 auto!important}
 & .home-filter>span {font:500 12px/18px var(--ala-font)!important}
 & .home-filter select,& .home-filter input {height:34px!important;min-height:34px!important;width:auto!important;min-width:120px!important;padding:6px 8px!important}
 & .home-filter:has(#focusOwner) {max-width:270px}
 & .home-v3-newopp {margin-left:auto!important;min-height:34px!important;padding:6px 10px!important}
 & .focus-heading-actions {display:flex!important;align-items:center!important;gap:10px!important;flex-wrap:wrap!important}
 & .focus-heading-actions .home-v3-link,& .focus-view-switch button {min-height:34px!important;padding:6px 8px!important}
 & .priority-name-link {min-height:24px!important;height:auto!important;padding:0!important}
 & .priority-toolbar {min-height:34px!important}
 & .priority-toolbar select {height:38px!important;min-height:38px!important;padding:7px 34px 7px 12px!important;line-height:22px!important;box-sizing:border-box!important;min-width:208px!important;max-width:100%!important}
 & .priority-toolbar>span:first-child {display:none!important}
 & .priority-toolbar>label {margin-left:auto!important}
 & .focus-group-more {min-height:28px!important;height:auto!important}
 & .home-side-panel h3 {font:600 15px/21px var(--ala-font)!important}
 & .home-side-row {min-height:40px!important;padding:3px!important}
 & .home-v3-properties-card .home-v3-card-head {min-height:0!important}
 & .home-v3-properties-card .home-v3-card-head p {display:none!important}
 & .home-featured-property-cover {height:auto!important;aspect-ratio:16/9!important}
 & .home-featured-property-btn {min-height:34px!important;height:34px!important}
}

html[data-ala-design="v2"][data-ala-theme][data-ala-revision="r1"] body.premium-ui-v2 #home#home#home#home {
 & .focus-heading .home-v3-intro-row {flex:1 1 480px!important;margin:0!important}
 & .focus-heading-copy {flex:0 0 auto!important}
 & .focus-heading-actions {flex:0 0 auto!important}
 & .focus-heading-actions .home-v3-link,& .focus-view-switch button,& .home-v3-newopp {height:34px!important;min-height:34px!important}
 & .home-v3-main-grid {margin-block-end:0!important}
 & .home-v3-tasks-card:has(#focusPriorityTab[aria-pressed="true"]) #homeCommercialFocus {max-height:320px!important;overflow-y:auto!important;overscroll-behavior:contain;scrollbar-gutter:stable}
 & .home-property-nav .home-v3-link,& .home-carousel-arrow {height:34px!important;min-height:34px!important}
 & .priority-row {grid-template-rows:auto auto!important}
}

/* One action component for Prioridades, Agenda, Vencidas and Sin próximo paso,
   including their expanded dialog. Keep the approved priority geometry. */
html[data-ala-design="v2"][data-ala-theme] body.premium-ui-v2 :is(#home#home#home#home,#focusDialog#focusDialog#focusDialog#focusDialog) {
 & .priority-load-more {display:block!important;margin:10px auto!important;min-height:36px!important}
 & .ala-focus-actions {display:flex!important;align-items:center;justify-content:flex-end;gap:6px!important;flex-wrap:wrap;min-width:0}
 & .ala-focus-action {appearance:none!important;flex:0 0 auto!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;height:auto!important;min-height:38px!important;padding:8px 12px!important;border:1px solid transparent!important;border-radius:8px!important;box-shadow:none!important;font:600 13px/20px var(--ala-font)!important;white-space:nowrap!important;overflow-wrap:normal!important;width:max-content!important;max-width:100%!important;background:var(--ala-selected)!important;color:var(--ala-selected-text)!important;cursor:pointer}
 & .ala-focus-action:hover:not(:disabled) {background:var(--ala-hover)!important;border-color:var(--ala-control-border)!important;color:var(--ala-selected-text)!important;box-shadow:none!important}
 & .ala-focus-action:active:not(:disabled) {background:var(--ala-selected)!important;color:var(--ala-selected-text)!important}
 & .ala-focus-action--secondary {background:transparent!important;color:var(--ala-text-secondary)!important;border-color:var(--ala-border)!important;font-weight:500!important}
 & .ala-focus-action--secondary[data-focus-action=evidence] {min-height:28px!important;padding:4px 2px!important;border-color:transparent!important;font:500 12px/18px var(--ala-font)!important}
 & .ala-focus-action--secondary[data-focus-action=evidence]:hover:not(:disabled) {background:transparent!important;color:var(--ala-text)!important;border-color:transparent!important;text-decoration:underline;text-underline-offset:3px}
 & .ala-focus-action:focus-visible {outline:2px solid var(--ala-focus)!important;outline-offset:3px!important}
 & .ala-focus-action:disabled {opacity:.5;cursor:not-allowed;box-shadow:none!important}
 & .ala-focus-action:before {content:"";width:16px;height:16px;flex:0 0 16px;background:currentColor;mask-repeat:no-repeat;mask-position:center;mask-size:contain}
 & .ala-focus-action[data-focus-action=task]:before {mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='4' width='14' height='17' rx='3'/%3E%3Cpath d='M9 3h6v4H9zM9 13l2 2 4-4'/%3E%3C/svg%3E")}
 & .ala-focus-action:is([data-focus-action=plan],[data-focus-action=schedule]):before {mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='3'/%3E%3Cpath d='M7 3v4M17 3v4M3 10h18M12 13v5M9.5 15.5h5'/%3E%3C/svg%3E")}
 & .ala-focus-action[data-focus-action=complete]:before {mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m7 12 3 3 7-7'/%3E%3C/svg%3E")}
 & .ala-focus-action[data-focus-action=evidence]:before {mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 11a9 9 0 1 1 2 7M3 5v6h6M12 7v5l3 2'/%3E%3C/svg%3E")}
 & .focus-reference-row {grid-template-columns:minmax(140px,1fr) minmax(0,2fr) max-content!important;align-items:center!important;gap:12px!important}
 & .focus-reference-actions {flex-direction:column;align-items:flex-end;max-width:none}
 & .focus-name-link {min-height:24px!important;height:auto!important;padding:0!important;font-size:15px!important;line-height:22px!important;white-space:normal!important;overflow-wrap:anywhere!important}
 & .focus-action-row .ala-focus-actions {justify-content:flex-start;margin-top:8px}
}
@media(max-width:1000px) {
 html[data-ala-design="v2"][data-ala-theme] body.premium-ui-v2 :is(#home#home#home#home,#focusDialog#focusDialog#focusDialog#focusDialog) {
  & .focus-reference-row {grid-template-columns:minmax(0,1fr) max-content!important}
  & .focus-reference-client {grid-column:1;grid-row:1}
  & .focus-reference-copy {grid-column:1;grid-row:2}
  & .focus-reference-actions {grid-column:2;grid-row:1/3}
 }
}
@media(max-width:750px) {
 html[data-ala-design="v2"][data-ala-theme] body.premium-ui-v2 :is(#home#home#home#home,#focusDialog#focusDialog#focusDialog#focusDialog) {
  & .focus-reference-row {display:grid!important;grid-template-columns:minmax(0,1fr)!important}
  & .focus-reference-actions {grid-column:1!important;grid-row:3!important;flex-direction:row!important;justify-content:flex-start!important;align-items:center!important;max-width:100%!important}
  & .ala-focus-action {white-space:normal!important;text-align:left}
 }
}

/* Density is spacing, never browser zoom. These components own their layout. */
@layer ala-phase4 {
html[data-ala-design=v2][data-ala-theme][data-ala-density] body.premium-ui-v2 #app#app {
 &>.main {min-width:0!important}
 &>.main>main {padding:var(--ala-page-padding)!important;min-width:0!important}
 &>.main>header {display:flex!important;flex-wrap:wrap!important;align-items:center!important;justify-content:space-between!important;gap:10px 20px!important;height:auto!important;min-height:64px!important;padding:10px var(--ala-page-padding)!important}
 &>.main>header>div:first-child {flex:0 1 auto!important;min-width:100px!important}
 &>.main>header>div:last-child {display:flex!important;flex:1 1 600px!important;flex-wrap:wrap!important;justify-content:flex-end!important;align-items:center!important;gap:8px!important;min-width:0!important}
 &>.main>header :is(button,select) {min-height:var(--ala-control-height)!important;height:auto!important;padding:7px 10px!important;white-space:nowrap!important;max-width:100%!important}
}
html[data-ala-design=v2][data-ala-theme][data-ala-density] body.premium-ui-v2 #pipeline#pipeline#pipeline {
 container-type:inline-size;
 & .ala-opportunity-header {display:grid!important;grid-template-columns:minmax(150px,1fr) auto!important;gap:12px!important;align-items:center!important;justify-content:stretch!important;text-align:left!important;padding:0!important;margin:0 0 var(--ala-layout-gap)!important;min-height:0!important;height:auto!important}
 & .ala-opportunity-header>div {width:auto!important;max-width:none!important;min-width:0!important;margin:0!important;text-align:left!important}
 & .ala-opportunity-header h2 {font-size:23px!important;line-height:30px!important;margin:0 0 3px!important}
 & .ala-opportunity-header .muted {font-size:13px!important;line-height:19px!important}
 & .opp-command-actions {display:flex!important;align-items:center!important;justify-content:flex-end!important;flex-wrap:nowrap!important;gap:10px!important;width:auto!important}
 & .opp-action-summary {display:flex!important;box-sizing:border-box!important;width:auto!important;min-width:0!important;max-width:100%!important;height:auto!important;min-height:44px!important;padding:6px 12px!important;white-space:normal!important;background:var(--ala-surface)!important;color:var(--ala-text)!important;border:1px solid var(--ala-border)!important;border-radius:9px!important;box-shadow:none!important}
 & .opp-action-summary-icon {display:none!important}
 & .opp-action-summary-copy {display:grid!important;grid-template-columns:minmax(100px,125px) auto!important;align-items:center!important;gap:12px!important;line-height:normal!important}
 & .opp-action-summary-copy>span {font:500 12px/16px var(--ala-font)!important;white-space:normal!important;color:var(--ala-text-secondary)!important}
 & #opportunityTotal {font:650 24px/28px var(--ala-font)!important;position:static!important;margin:0!important;color:var(--ala-text)!important;font-variant-numeric:tabular-nums}
 & .opp-action-btn {height:auto!important;min-height:var(--ala-control-height)!important;min-width:0!important;width:auto!important;padding:8px 12px!important;white-space:nowrap!important;font:600 13px/20px var(--ala-font)!important}
 & .opp-commandbar {display:block!important;margin:0 0 8px!important}
 & .opp-command-main {display:grid!important;grid-template-columns:minmax(170px,1.5fr) repeat(3,minmax(120px,1fr)) auto!important;gap:8px!important;align-items:center!important;width:100%!important}
 & .opp-command-main>.opp-search-wrap {width:100%!important;max-width:none!important;min-width:0!important;height:var(--ala-control-height)!important;grid-column:auto!important}
 & .opp-command-main>select {width:100%!important;max-width:none!important;min-width:0!important;height:var(--ala-control-height)!important;font:500 13px/20px var(--ala-font)!important}
 & .opp-filter-tools {display:flex!important;align-items:center;gap:8px;min-width:0}
 & .opp-filter-tools>button {width:auto!important;min-height:var(--ala-control-height)!important;height:auto!important;padding:8px 10px!important;margin:0!important;white-space:nowrap!important;font-size:13px!important}
 & .opp-filter-feedback {margin:4px 0 8px!important;min-height:20px!important}
 & .opp-command-secondary {margin:0 0 10px!important;gap:8px!important}
 & .opp-command-secondary .opp-won-operations {min-height:var(--ala-control-height)!important;padding:6px 10px!important}
 & .opp-scroll-shell {margin-top:0!important;padding-top:0!important}
 & #board {padding:0!important;gap:14px!important}
 & .opp-stage {flex:0 0 300px!important;width:300px!important;min-width:280px!important;max-width:340px!important}
 & .opp-stage-head {min-height:72px!important;padding:10px 12px!important}
}
@container (max-width:900px) {
 html[data-ala-design=v2][data-ala-theme][data-ala-density] body.premium-ui-v2 #pipeline#pipeline#pipeline {
  & .ala-opportunity-header {grid-template-columns:1fr!important}
  & .opp-command-actions {justify-content:flex-start!important;flex-wrap:wrap!important}
  & .opp-command-main {grid-template-columns:repeat(3,minmax(0,1fr))!important}
  & .opp-command-main>.opp-search-wrap {grid-column:1/3!important}
  & .opp-filter-tools {grid-column:3;grid-row:1;justify-content:flex-end}
 }
}
@container (max-width:520px) {
 html[data-ala-design=v2][data-ala-theme][data-ala-density] body.premium-ui-v2 #pipeline#pipeline#pipeline {
  & .opp-command-actions {display:grid!important;grid-template-columns:1fr 1fr!important;width:100%!important}
  & .opp-action-summary {grid-column:1/-1;justify-content:space-between!important}
  & .opp-action-summary-copy {width:100%;grid-template-columns:1fr auto!important}
  & .opp-command-main {grid-template-columns:repeat(2,minmax(0,1fr))!important}
  & .opp-command-main>.opp-search-wrap {grid-column:1/-1!important}
  & .opp-filter-tools {grid-column:auto;grid-row:auto;justify-content:flex-start;flex-wrap:wrap}
  & .opp-action-btn {white-space:normal!important}
  & .opp-stage {flex-basis:min(300px,85cqw)!important;width:min(300px,85cqw)!important;min-width:240px!important}
 }
}
html[data-ala-density=compact][data-ala-design=v2][data-ala-theme] body.premium-ui-v2 #home#home#home#home {
 & .home-day-kpis {gap:10px!important;margin-bottom:10px!important}
 & .home-day-kpi {min-height:66px!important;padding:10px!important}
 & .home-workspace {gap:10px!important}
 & .home-v3-tasks-card {padding:12px 14px!important}
}
@media(max-width:750px) {
 html[data-ala-design=v2][data-ala-theme][data-ala-density] body.premium-ui-v2 #home#home#home#home {
  & .focus-heading {flex-wrap:wrap!important;gap:8px!important}
  & .focus-heading .home-v3-intro-row {flex-basis:100%!important}
  & .home-filter {max-width:100%!important;min-width:0!important}
  & .home-filter select {min-width:0!important;max-width:100%!important}
  & .home-side-heading {height:auto!important;flex-wrap:wrap!important}
 }
}

}

/* Home adapts to its actual content width, including the navigation rail. */
@layer ala-phase4 {
 html[data-ala-density][data-ala-theme] #home#home#home#home {container-type:inline-size}
 @container (max-width:850px) {
  html[data-ala-density][data-ala-theme] #home#home#home#home {
   & .home-day-kpis {grid-template-columns:repeat(3,minmax(0,1fr))!important}
   & .home-day-kpi:last-child {grid-column:auto!important}
   & .home-day-kpi span {overflow-wrap:anywhere;min-width:0}
  }
 }
 @container (max-width:580px) {
  html[data-ala-density][data-ala-theme] #home#home#home#home {
   & .home-day-kpis {grid-template-columns:repeat(2,minmax(0,1fr))!important}
   & .home-day-kpi:last-child {grid-column:1/-1!important}
  }
 }
 @media(min-width:1101px) {
  html[data-ala-density=compact][data-ala-theme] #home#home#home#home {
   & #homeRecentContacts>.home-side-row:nth-child(n+3),& #homePendingFollowups>.home-side-row:nth-child(n+3) {display:none!important}
   & .focus-view-switch button,& .home-v3-newopp,& .home-v3-filters select,& .priority-toolbar select {min-height:38px!important;height:38px!important}
   & .focus-view-switch {min-height:0!important}
   & .priority-toolbar {min-height:38px!important}
  }
 }
}

/* Home controls have one owner: fixed compact dimensions, width-only reflow.
   No viewport-height density changes, transform scaling or JavaScript resizing. */
@layer ala-phase4 {
html[data-ala-design=v2][data-ala-theme][data-ala-density=compact][data-ala-revision=r1] body.premium-ui-v2 #home#home#home#home {
 & .focus-filter-row {display:grid!important;grid-template-columns:minmax(160px,.95fr) minmax(0,3.8fr)!important;align-items:start!important;gap:14px!important;margin:0 0 14px!important;padding:0!important;height:auto!important;min-height:0!important}
 & .focus-filter-row .focus-heading-copy {min-width:0!important;padding:0!important}
 & .focus-filter-row h3 {font:600 20px/26px var(--ala-font)!important;margin:0!important;letter-spacing:normal!important}
 & .focus-filter-row #focusSubtitle {font:400 12px/18px var(--ala-font)!important;margin:4px 0 0!important}
 & .focus-filter-row .home-v3-intro-row {display:block!important;min-width:0!important;width:100%!important;margin:0!important;padding:0!important}
 & .focus-filter-row .home-v3-filters {display:grid!important;grid-template-columns:minmax(140px,1.12fr) minmax(120px,.9fr) repeat(2,minmax(138px,1fr))!important;align-items:start!important;gap:12px!important;margin:0!important;width:100%!important;min-width:0!important}
 & .focus-filter-row .home-filter {display:grid!important;grid-template-rows:18px 38px!important;align-items:start!important;gap:5px!important;min-width:0!important;max-width:none!important;margin:0!important;padding:0!important}
 & .focus-filter-row .home-filter>span {font:500 12px/18px var(--ala-font)!important;white-space:nowrap!important;margin:0!important}
 & .focus-filter-row .home-filter :is(select,input) {box-sizing:border-box!important;display:block!important;min-width:0!important;width:100%!important;max-width:100%!important;height:38px!important;min-height:38px!important;padding:7px 9px!important;margin:0!important;font:500 13px/20px var(--ala-font)!important}
 & .focus-navigation-row {display:flex!important;flex-wrap:wrap!important;align-items:center!important;justify-content:space-between!important;gap:8px 16px!important;padding:0 0 8px!important;margin:0!important;border-bottom:1px solid var(--ala-border)}
 & .focus-navigation-row .focus-view-switch {display:flex!important;align-items:center!important;gap:12px!important;flex-wrap:wrap!important;min-width:0!important;padding:0!important;margin:0!important;border:0!important}
 & .focus-navigation-row .focus-view-switch button {flex:0 0 auto!important;min-height:38px!important;height:38px!important;padding:7px 5px!important;margin:0!important;font:500 13px/20px var(--ala-font)!important;white-space:nowrap!important}
 & .focus-navigation-row .focus-heading-actions {display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:8px!important;flex-wrap:nowrap!important;margin:0 0 0 auto!important;min-width:0!important}
 & .focus-navigation-row :is(.home-v3-newopp,.home-v3-link,#focusTotal) {box-sizing:border-box!important;flex:0 0 auto!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;width:auto!important;min-width:0!important;max-width:100%!important;min-height:38px!important;height:38px!important;margin:0!important;padding:7px 10px!important;font:500 12px/20px var(--ala-font)!important;white-space:nowrap!important}
 & .focus-navigation-row #focusTotal {min-width:92px!important;background:var(--ala-selected)!important;color:var(--ala-selected-text)!important;border-radius:7px!important}
 & .focus-navigation-row .home-v3-newopp {font-weight:600!important}
 & .focus-filter-row [aria-invalid=true] {border-color:var(--ala-error)!important}
}
@container (max-width:1250px) {
 html[data-ala-design=v2][data-ala-theme][data-ala-density=compact][data-ala-revision=r1] body.premium-ui-v2 #home#home#home#home {
  & .focus-filter-row {grid-template-columns:1fr!important;gap:10px!important}
  & .focus-filter-row .home-v3-filters {grid-template-columns:repeat(4,minmax(0,1fr))!important}
 }
}
@container (max-width:850px) {
 html[data-ala-design=v2][data-ala-theme][data-ala-density=compact][data-ala-revision=r1] body.premium-ui-v2 #home#home#home#home {
  & .home-workspace {grid-template-columns:minmax(0,1fr)!important}
  & .focus-filter-row .home-v3-filters {grid-template-columns:repeat(2,minmax(0,1fr))!important}
  & .focus-navigation-row {display:grid!important;grid-template-columns:minmax(0,1fr)!important}
  & .focus-navigation-row .focus-heading-actions {margin:0!important;justify-content:flex-start!important}
 }
}
@container (max-width:380px) {
 html[data-ala-design=v2][data-ala-theme][data-ala-density=compact][data-ala-revision=r1] body.premium-ui-v2 #home#home#home#home {
  & .focus-navigation-row .focus-heading-actions {gap:5px!important;flex-wrap:wrap!important}
  & .focus-navigation-row :is(.home-v3-newopp,.home-v3-link,#focusTotal) {padding-inline:6px!important;font-size:12px!important}
  & .focus-navigation-row #focusTotal {min-width:0!important}
  & .focus-navigation-row .focus-view-switch {gap:6px!important}
 }
}
}

/* Component rules share the existing important cascade layer. */
@layer ala-phase4 {
 html[data-ala-design="v2"][data-ala-theme] body.premium-ui-v2 :is(#home#home#home#home,#focusDialog#focusDialog#focusDialog#focusDialog) {
 & .priority-name-link {appearance:none!important;display:inline!important;width:auto!important;max-width:100%!important;height:auto!important;min-height:24px!important;margin:0!important;padding:0!important;border:0!important;border-radius:3px!important;background:transparent!important;box-shadow:none!important;text-shadow:none!important;color:var(--ala-text)!important;font:600 15px/22px var(--ala-font)!important;text-align:left!important;white-space:normal!important;overflow-wrap:anywhere!important;cursor:pointer}
 & .priority-name-link:hover {background:transparent!important;color:var(--ala-selected-text)!important;text-decoration:underline;text-underline-offset:3px}
 & .priority-name-link:focus:not(:focus-visible) {outline:none!important}
 & .priority-name-link:focus-visible {outline:2px solid var(--ala-focus)!important;outline-offset:3px!important}
 & .priority-name-link:disabled {opacity:.5;cursor:not-allowed}
 }
 html[data-ala-design="v2"][data-ala-theme] body.premium-ui-v2 #home#home#home#home #focusPriorityLevel {
  height:38px!important;min-height:38px!important;line-height:22px!important;padding:7px 34px 7px 12px!important;box-sizing:border-box!important;min-width:208px!important;width:208px!important;max-width:100%!important;
 }
}

html[data-ala-theme] body.premium-ui-v2 #home .home-day-kpi .day-icon.kpi-followup {color:var(--ala-chart-3)!important;background:color-mix(in srgb,var(--ala-chart-3) 12%,var(--ala-surface))!important}
