/* Readable property lists; retain the existing two-line address content. */
html body main #ca-list .property-summary h3{font-size:18px;line-height:1.3}
html body main #ca-list .property-summary p{font-size:16px;line-height:1.4;color:inherit}
html body main #pm-dashboard .pm-property-row span{font-size:16px;line-height:1.4;color:inherit}
/* Shared content footers, without changing dashboard navigation or header Back. */
html body :is(main,dialog.property-job-dialog.business-job-dialog.customer-job-dialog,dialog.property-job-dialog.business-job-dialog,dialog) :is(.job-final-actions,.customer-job-actions,.company-job-actions,.job-note-actions,.hub-button-row,.product-actions){display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;align-items:stretch!important;justify-content:center!important;gap:8px!important;box-sizing:border-box;width:100%;margin:12px auto 0!important}
html body :is(main,dialog.property-job-dialog.business-job-dialog.customer-job-dialog,dialog.property-job-dialog.business-job-dialog,dialog) :is(.job-final-actions,.customer-job-actions,.company-job-actions,.job-note-actions,.hub-button-row,.product-actions)>button{display:flex!important;align-items:center!important;justify-content:center!important;grid-column:auto;min-width:0!important;max-width:none!important;width:100%!important;min-height:52px!important;height:100%!important;margin:0!important;padding:10px 8px!important;border-width:2px!important;border-style:solid!important;text-align:center!important;white-space:normal!important;word-break:normal!important;overflow-wrap:normal!important}
html body :is(main,dialog.property-job-dialog.business-job-dialog.customer-job-dialog,dialog.property-job-dialog.business-job-dialog,dialog) :is(.job-final-actions,.customer-job-actions,.company-job-actions,.job-note-actions,.hub-button-row,.product-actions)>button:nth-last-child(1 of button:not([hidden])):nth-child(odd of button:not([hidden])){grid-column:1/-1!important}
html body :is(main,dialog.property-job-dialog.business-job-dialog.customer-job-dialog,dialog.property-job-dialog.business-job-dialog,dialog) :is(.job-final-actions,.customer-job-actions,.company-job-actions,.job-note-actions,.hub-button-row,.product-actions)>[hidden]{display:none!important}
html body :is(main,dialog.property-job-dialog.business-job-dialog.customer-job-dialog,dialog.property-job-dialog.business-job-dialog,dialog) .customer-job-actions>dialog{grid-column:1/-1}
@layer hub-button-typography{
html body :is(main,dialog.property-job-dialog.business-job-dialog.customer-job-dialog,dialog.property-job-dialog.business-job-dialog,dialog) :is(.job-final-actions,.customer-job-actions,.company-job-actions,.job-note-actions,.hub-button-row,.product-actions)>button:not([data-hub-nav]):not(.hub-detail-close):not(.job-fullscreen-back):not(.missing-field-icon){font-size:16px!important;line-height:1.3!important}
}

html body main :is(#ca-add,#ca-archived),html body main #ca-list:not(.property-detail)>button{min-height:52px;line-height:1.3}
@layer hub-button-typography{html body main :is(#ca-add,#ca-archived),html body main #ca-list:not(.property-detail)>button{font-size:16px!important;line-height:1.3!important}}

@layer hub-button-typography{html body main #pm-dashboard .pm-property-row{font-size:16px!important;line-height:1.4!important}}

/* Job actions: one colored row, preserving text size and authorized controls. */
@layer hub-job-one-row {
 html body :is(.job-final-actions,.customer-job-actions,.company-job-actions)[data-hub-colored-count]:not([data-hub-colored-count="0"]):not([data-hub-colored-count="1"]){display:grid!important;grid-template-columns:repeat(12,minmax(0,1fr))!important;gap:8px!important;align-items:stretch!important}
 html body :is(.job-final-actions,.customer-job-actions,.company-job-actions)[data-hub-colored-count]:not([data-hub-colored-count="0"]):not([data-hub-colored-count="1"])>button{grid-column:span 6!important;min-width:0!important;width:100%!important;height:auto!important;min-height:52px!important;padding:4px 2px!important}
 html body :is(.job-final-actions,.customer-job-actions,.company-job-actions)[data-hub-colored-count="3"]>button[data-hub-action-color]:not([data-hub-action-color="white"]){grid-column:span 4!important}
 html body :is(.job-final-actions,.customer-job-actions,.company-job-actions)[data-hub-colored-count="4"]>button[data-hub-action-color]:not([data-hub-action-color="white"]){grid-column:span 3!important}
 html body :is(.job-final-actions,.customer-job-actions,.company-job-actions)[data-hub-colored-count]:not([data-hub-colored-count="0"]):not([data-hub-colored-count="1"]):not([data-hub-white-count="3"])>button[data-hub-action-color="white"]:nth-last-child(1 of button[data-hub-action-color="white"]:not([hidden])):nth-child(odd of button[data-hub-action-color="white"]:not([hidden])){grid-column:1/-1!important}
}

/* Four authorized actions on the narrowest phones: keep readable type, trim whitespace. */
@media(max-width:360px){
 @layer hub-job-one-row{html body .job-final-actions[data-hub-colored-count="4"]>button[data-hub-action-color]:not([data-hub-action-color="white"]){padding-block:0!important}}
 @layer hub-button-typography{html body dialog.property-job-dialog.business-job-dialog .job-final-actions[data-hub-colored-count="4"]>button[data-hub-action-color]:not([data-hub-action-color="white"]):not([hidden]):not(.hub-detail-close):not(.job-fullscreen-back):not(.missing-field-icon){line-height:1.2!important}}
}

@layer hub-job-one-row {
 html body .job-final-actions[data-hub-colored-count]:not([data-hub-colored-count="0"]):not([data-hub-colored-count="1"])[data-hub-white-count="3"]>button[data-hub-action-color="white"]:not([hidden]){grid-column:span 4!important}
}

/* Properties and product entry use the agreed bottom action rows. */
html body main #ca-actions{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px!important;align-items:stretch!important;margin:12px 0 0!important}
html body main #ca-actions:not(:has(.property-list-expenses)){grid-template-columns:repeat(2,minmax(0,1fr))!important}
html body main #ca-actions>button,html body main #products-form>.product-entry-actions>button{grid-column:auto!important;min-width:0!important;width:100%!important;max-width:none!important;height:100%!important;margin:0!important;text-align:center!important}
html body main #products-form>.product-entry-actions{grid-template-columns:repeat(3,minmax(0,1fr))!important}
html body #products-type-panel[hidden],html body #products-add[hidden],html body #ca-actions>button[hidden]{display:none!important}
html body #products-type-panel .product-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
html body #products-type-read{display:none!important}

html body [data-view-panel="addresses"]:has(#ca-form:not([hidden])) #ca-actions{display:none!important}

#ca-actions:has(> #ca-add[hidden]):has(> #ca-archived[hidden]){grid-template-columns:1fr!important}
#my-products #spendings-section{display:none!important}

/* Only the approved Properties and product-entry rows dock at the viewport bottom. */
html body main #ca-archived{text-decoration:none!important}
html body main .hub-viewport-actions{position:fixed!important;z-index:35; margin:0!important;background:white}
html body main #products-receipt-pick{background:#b4232c!important;border-color:#b4232c!important;color:#fff!important;-webkit-text-fill-color:#fff!important}
html body main #products-form>.product-entry-actions>#products-receipt-pick{order:0!important}
html body main #products-form>.product-entry-actions>#products-label-pick{order:1!important}
html body main #products-form>.product-entry-actions>#products-save{order:2!important}

/* Property details: authorized white controls above the red/yellow/blue bottom row. */
html body main #ca-list.property-detail~#ca-actions,
html body main [data-view-panel="addresses"]:has(#ca-list.property-detail) #ca-actions{display:none!important}
html body main .property-detail-footer{display:grid!important;grid-template-columns:1fr!important;gap:8px!important;order:110!important;grid-column:1/-1!important;max-height:65dvh;overflow-y:auto;padding:4px 0}
html body main .property-detail-footer>.property-footer-white{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
html body main .property-detail-footer>.property-footer-colors{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px!important}
html body main .property-detail-footer>.property-footer-colors[data-count="2"]{grid-template-columns:repeat(2,minmax(0,1fr))!important}
html body main .property-detail-footer>.property-footer-colors[data-count="1"]{grid-template-columns:1fr!important}
html body main .property-detail-footer>div:empty{display:none!important}
html body main .property-detail-footer>div>button,html body main .property-detail-footer>div>a.button{min-width:0!important;width:100%!important;max-width:none!important;height:auto!important;min-height:52px!important;margin:0!important;grid-column:auto!important;padding:4px 2px!important;display:flex;align-items:center;justify-content:center;text-align:center;overflow-wrap:normal!important}
html body main .property-detail-footer>.property-footer-white>button:last-child:nth-child(odd){grid-column:1/-1!important}
html body main .property-detail-footer [hidden]{display:none!important}
html body main .property-history-heading{display:grid;grid-template-columns:52px 1fr 52px;align-items:center;gap:8px;margin-bottom:16px;text-align:center}
html body main .property-history-heading>button{width:52px;min-height:52px;margin:0;font-size:24px}
html body main .property-history-heading>h1{margin:0}
html body main #property-history .property-job-categories{width:100%;text-align:center}

/* Property Products: grouped creation choices, saved products below. */
html body #products-type-panel{border:1px solid #cbd2dc;border-radius:16px;padding:16px;margin:16px 0;box-sizing:border-box}
html body #products-type-panel>p{font-weight:700;text-align:center;margin:0 0 12px}
html body #products-list .product-card{touch-action:pan-y}
html body #products-list .product-dragging{outline:3px solid #1b2f78;opacity:.8}
html body #products-list .product-dragging .product-card{touch-action:none}
html body .property-history-heading.hub-page-heading{width:100%;box-sizing:border-box}
html body dialog[data-email-review]{height:calc(100dvh - 24px);max-height:calc(100dvh - 24px)!important;box-sizing:border-box;padding:16px;}
html body dialog[data-email-review][open]{display:flex;flex-direction:column}
html body dialog[data-email-review] .email-review-content{flex:1;min-height:0;overflow:auto}
html body dialog[data-email-review] .email-review-footer{flex-shrink:0;padding-top:12px}
html body dialog[data-email-review] .email-review-footer>button{width:100%;margin:0 0 8px}

/* Preserve the agreed readable size in Products; allow wrapping instead of shrinking. */
@layer hub-button-typography{html body main #products-list .product-card,html body main #products-list .product-card :is(strong,span,small){font-size:16px!important;line-height:1.35!important;overflow-wrap:anywhere}}

@layer hub-button-typography{html body dialog[data-email-review] .email-review-footer button:not([data-hub-nav]):not(.hub-detail-close):not(.job-fullscreen-back):not(.missing-field-icon){font-size:16px!important;line-height:1.35!important}}

html body main #ca-list .property-owner-actions>.property-footer-white{grid-auto-rows:1fr!important;gap:8px!important}
html body main #ca-list .property-owner-actions>.property-footer-white>button{order:0!important;grid-column:auto!important;border-radius:12px;font-weight:700}
html body main #ca-list .property-owner-actions>.property-footer-white>button:active{box-shadow:inset 0 0 0 3px #c9e0ff}
dialog[data-property-history-owner] fieldset{display:grid;gap:8px;border:0;margin:0;padding:0;min-width:0}
dialog[data-property-history-owner] label{display:grid;gap:4px;text-align:left}
dialog[data-property-history-owner] :is(input,textarea){box-sizing:border-box;width:100%;min-width:0;font:inherit}

/* Keep the Personal property tiles inside the existing card. */
html:root body.personal-portal:not(.pm-portal) #ca-list.property-detail .property-owner-actions{box-sizing:border-box;width:100%!important;max-width:none!important;justify-self:stretch;max-height:none;overflow:visible;padding:4px 0 calc(4px + env(safe-area-inset-bottom,0px));gap:0!important}
@layer hub-action-colors {
html:root body.personal-portal:not(.pm-portal) #ca-list.property-detail .property-owner-actions>.property-footer-white{box-sizing:border-box;width:100%!important;max-width:none!important;justify-self:stretch;grid-template-columns:repeat(4,minmax(0,1fr))!important;grid-auto-rows:auto!important;gap:6px!important}
html:root body.personal-portal:not(.pm-portal) #ca-list.property-detail .property-owner-actions>.property-footer-white>button{box-sizing:border-box;width:100%!important;height:auto!important;aspect-ratio:1;min-height:0!important;align-self:start;border:1px solid #dce2eb!important;border-radius:8px!important;box-shadow:0 2px 6px rgba(20,35,60,.08)!important;padding:2px!important;overflow-wrap:anywhere!important}
html:root body.personal-portal:not(.pm-portal) #ca-list.property-detail .property-owner-actions>.property-footer-white>button.property-connect-tenant{grid-area:1/1!important}
html:root body.personal-portal:not(.pm-portal) #ca-list.property-detail .property-owner-actions>.property-footer-white>button.property-product-action{grid-area:1/2!important}
html:root body.personal-portal:not(.pm-portal) #ca-list.property-detail .property-owner-actions>.property-footer-white>button.property-edit-action{grid-area:1/3!important}
html:root body.personal-portal:not(.pm-portal) #ca-list.property-detail .property-owner-actions>.property-footer-white>button.property-history-action{grid-area:1/4!important}
html:root body.personal-portal:not(.pm-portal) #ca-list.property-detail .property-owner-actions>.property-footer-white>button.property-purchase-history{grid-area:2/1!important}
html:root body.personal-portal:not(.pm-portal) #ca-list.property-detail .property-owner-actions>.property-footer-white>button.property-expenses{grid-area:2/2!important}
html:root body.personal-portal:not(.pm-portal) #ca-list.property-detail .property-owner-actions>.property-footer-white>button.property-delete-action{grid-area:2/3!important}
html:root body.personal-portal:not(.pm-portal) #ca-list.property-detail .property-owner-actions>.property-footer-white>button.property-documents-action{grid-area:2/4!important}
}
@layer hub-button-typography {
html:root body.personal-portal:not(.pm-portal) #ca-list.property-detail .property-owner-actions>.property-footer-white>button{font-size:12px!important;line-height:1.15!important}
}

/* The Personal property list uses the viewport for its footer, independently of the card. */
html body.personal-portal:not(.pm-portal) main #account.active #ca-actions.hub-viewport-actions {
 box-sizing:border-box;
 max-width:none!important;
 margin:0!important;
 padding:0 clamp(8px,3vw,24px) max(3px,env(safe-area-inset-bottom,0px))!important;
 grid-template-columns:none!important;
 grid-auto-flow:column!important;
 grid-auto-columns:minmax(0,1fr)!important;
 align-items:stretch!important;
 gap:6px!important;
}
html body.personal-portal:not(.pm-portal) main #account.active #ca-actions.hub-viewport-actions > button:not([hidden]) {
 grid-column:auto!important;
 height:auto!important;
 min-width:0!important;
 padding:4px 2px!important;
 white-space:normal!important;
 overflow-wrap:anywhere!important;
}
@media(max-width:600px){
 html body.personal-portal:not(.pm-portal) main #account.active #ca-actions.hub-viewport-actions {
  padding:0 env(safe-area-inset-right,0px) calc(4px + env(safe-area-inset-bottom,0px)) env(safe-area-inset-left,0px)!important;
 }
}
