/* Shared layout contract for every authenticated workspace. Palette remains
   owned by the existing theme; public sites and exported documents are excluded. */
#appScreen .shell-main :is(.admin-panel,.annual-panel,.portal-panel,.commercial-section,.tenant-prospects-panel,.official-fiscal-card,.client-checklist-card,.client-request-card,.integration-card,.admin-integration-card,.commercial-plan,.commercial-wallet,.portal-fee-card,.billing-import-panel) {
 border-radius:8px!important;box-shadow:none!important;background-image:none!important;transform:none!important;
}
#appScreen .shell-main :is(.admin-header,.annual-hero,.commercial-hero,.popup-hero,.client-requests-hero,.payroll-shell>header,.portal-access-panel>header,.official-fiscal-card>header) {
 background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important;padding:6px 0 18px!important;gap:16px!important;
}
#appScreen .shell-main :is(.admin-header,.annual-hero,.commercial-hero,.popup-hero,.payroll-shell>header)>div>small {display:none!important}
#appScreen .shell-main :is(.annual-module-toolbar,.payroll-toolbar,.personnel-toolbar,.rh-toolbar,.fiscal-validation-toolbar,.tenant-builder-toolbar,.admin-directory-toolbar) {
 padding:12px 16px!important;border-radius:8px!important;box-shadow:none!important;background-image:none!important;gap:12px!important;align-items:end;
}
#appScreen .shell-main :is(.annual-module-toolbar,.payroll-toolbar,.personnel-toolbar,.rh-toolbar,.fiscal-validation-toolbar)>label {margin:0!important;min-width:0}
#appScreen .shell-main :is(.admin-panel,.annual-panel,.portal-panel,.commercial-section,.official-fiscal-card)>header {padding:16px 18px!important;gap:12px!important;box-shadow:none!important;background-image:none!important}
#appScreen .shell-main :is(.commercial-wallet-grid,.annual-summary-grid,.payroll-process-grid,.admin-integration-grid,.client-checklist-grid,.portal-client-home-grid) {gap:16px!important}
#appScreen .shell-main :is(.commercial-wallet-grid,.annual-summary-grid,.payroll-process-grid)>article {padding:16px!important;border-radius:8px!important;background-image:none!important;box-shadow:none!important}
#appScreen .shell-main :is(.commercial-wallet-grid,.annual-summary-grid,.payroll-process-grid)>article b {font-size:22px!important;font-weight:600!important}
#appScreen .shell-main button:not([role=option]) {font-family:Inter,system-ui,sans-serif!important;box-shadow:none!important;text-shadow:none!important;letter-spacing:0!important}
#appScreen .shell-main :is(button.primary,button.secondary,a.primary,a.secondary,button[type=submit]) {width:auto!important;max-width:100%;flex-grow:0!important;white-space:normal!important}
#appScreen .shell-main :is(.payroll-shell,.annual-panel,.admin-panel,.portal-panel,.commercial-section) :is(button.primary,button.secondary,button[type=submit]) {min-height:36px!important;padding:8px 12px!important;font-size:12px!important;border-radius:6px!important}
#appScreen .shell-main :is(.payroll-shell,.annual-panel,.admin-panel,.portal-panel,.commercial-section) button svg {width:16px;height:16px;flex-shrink:0;stroke-width:1.7}
#appScreen .consult-card:has(:is(.payroll-shell,.commercial-center,.annual-panel,.fiscal-agent-shell,.portal-panel)) {border:0!important;background:transparent!important;padding:0!important;box-shadow:none!important}
#appScreen .consult-card:has(:is(.payroll-shell,.commercial-center,.annual-hero))>.card-heading {display:none!important}
#appScreen .shell-main :is(.account-panel,.admin-panel,.annual-panel,.portal-panel) p {max-width:80ch;line-height:1.55}
#appScreen .shell-main :is(.payroll-shell,.annual-panel,.admin-panel,.portal-panel,.commercial-section)>footer {display:flex!important;justify-content:flex-end;align-items:center;flex-wrap:wrap;gap:8px!important;padding-top:16px!important}
/* Dialogs follow the same scale as pages without changing their layout or focus. */
:is(.payroll-modal,.accounting-policy-modal,.commercial-modal,.admin-modal,.portal-modal,.client-request-modal,.client-request-detail-modal,.client-checklist-modal,.portal-fee-modal) :is(h2,h3) {font:600 18px/1.4 Inter,system-ui,sans-serif!important;letter-spacing:-.015em!important}
:is(.payroll-modal,.accounting-policy-modal,.commercial-modal,.admin-modal,.portal-modal,.client-request-modal,.client-request-detail-modal,.client-checklist-modal,.portal-fee-modal) :is(label,input,select,textarea,button) {font-family:Inter,system-ui,sans-serif!important;font-size:12px!important;letter-spacing:0!important}
:is(.payroll-modal,.accounting-policy-modal,.commercial-modal,.admin-modal,.portal-modal,.client-request-modal,.client-request-detail-modal,.client-checklist-modal,.portal-fee-modal) :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea) {border-radius:6px!important;padding:9px 11px!important}
:is(.payroll-modal,.accounting-policy-modal,.commercial-modal,.admin-modal,.portal-modal,.client-request-modal,.client-request-detail-modal,.client-checklist-modal,.portal-fee-modal) footer button {min-height:36px!important;padding:8px 14px!important;width:auto!important;flex-grow:0!important;border-radius:6px!important;white-space:normal!important;box-shadow:none!important}
@media(min-width:1101px){#appScreen .shell-main :is(.admin-panel,.annual-panel,.portal-panel,.commercial-center) {max-width:1280px;margin-left:auto;margin-right:auto;width:100%;box-sizing:border-box}}
@media(max-width:720px){
 #appScreen .shell-main :is(.admin-header,.annual-hero,.commercial-hero,.popup-hero,.payroll-shell>header) {flex-wrap:wrap!important;align-items:flex-start!important}
 #appScreen .shell-main :is(.annual-module-toolbar,.payroll-toolbar,.personnel-toolbar,.rh-toolbar) {gap:10px!important;padding:12px!important}
 #appScreen .shell-main :is(.commercial-wallet-grid,.annual-summary-grid,.admin-integration-grid,.client-checklist-grid) {grid-template-columns:1fr!important}
}

/* Semantic action variants shared by pages and dialogs. */
:is(#appScreen .shell-main,dialog,[role="dialog"],.modal,.payroll-modal,.accounting-policy-modal,.admin-modal,.commercial-modal,.portal-modal,.client-request-modal,.client-request-detail-modal,.client-checklist-modal,.portal-fee-modal) button.mc-button {
 box-sizing:border-box!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;width:auto!important;min-width:max-content!important;max-width:100%!important;height:auto!important;flex:0 0 auto!important;min-height:36px!important;padding:8px 12px!important;border-radius:6px!important;font:600 12px/1.4 Inter,system-ui,sans-serif!important;gap:6px!important;
}
:is(#appScreen .shell-main,dialog,[role="dialog"],.modal,.payroll-modal,.accounting-policy-modal,.admin-modal,.commercial-modal,.portal-modal,.client-request-modal,.client-request-detail-modal,.client-checklist-modal,.portal-fee-modal) button.mc-button.mc-button--icon {
 width:36px!important;min-width:36px!important;max-width:36px!important;height:36px!important;min-height:36px!important;flex:0 0 36px!important;padding:0!important;
}
#appScreen .shell-main div.client-directory-actions {flex-wrap:nowrap!important;gap:6px!important;min-width:120px;}
#appScreen .shell-main .client-directory-table {overflow-x:auto;}
#appScreen .shell-main .client-directory-table>header,#appScreen .shell-main .client-directory-row {min-width:1050px;}
#appScreen .shell-main .tenant-prospects-panel>header {padding:16px 20px!important;}
#appScreen .shell-main .tenant-prospects-panel h2 {font-size:16px!important;}
#appScreen .shell-main .tenant-prospects-panel>header>div>span {font-size:10px;letter-spacing:.035em;}
#appScreen .shell-main .prospect-list article {min-width:0;}
#appScreen .shell-main .prospect-list article>div {min-width:0;overflow-wrap:anywhere;}
/* Hidden actions must remain hidden despite legacy display:inline-flex rules. */
:is(#appScreen,dialog,[role="dialog"],.modal,.payroll-modal,.accounting-policy-modal,.admin-modal,.commercial-modal) :is([hidden],button.mc-button[hidden]) {display:none!important;}
@media(pointer:coarse){:is(#appScreen .shell-main,dialog,[role="dialog"],.modal,.payroll-modal,.accounting-policy-modal,.admin-modal,.commercial-modal) button.mc-button {min-height:44px!important;} :is(#appScreen .shell-main,dialog,[role="dialog"],.modal,.payroll-modal,.accounting-policy-modal,.admin-modal,.commercial-modal) button.mc-button.mc-button--icon {width:44px!important;min-width:44px!important;max-width:44px!important;height:44px!important;flex-basis:44px!important;} #appScreen .shell-main div.client-directory-actions {min-width:144px;}}
@media(max-width:700px){#appScreen .shell-main .prospect-list article {grid-template-columns:34px minmax(0,1fr)!important;} #appScreen .shell-main .prospect-list article>:nth-child(n+3) {grid-column:2;}}

/* Shared action meaning across tables, forms and dialogs. */
body .mc-action-delete,#appScreen .mc-action-delete{background:#c92a3b!important;border-color:#c92a3b!important;color:#fff!important;box-shadow:none!important}
body .mc-action-excel,#appScreen .mc-action-excel{background:#167346!important;border-color:#167346!important;color:#fff!important;box-shadow:none!important}
body .mc-action-delete:hover:not(:disabled),#appScreen .mc-action-delete:hover:not(:disabled){background:#aa2030!important;border-color:#aa2030!important}
body .mc-action-excel:hover:not(:disabled),#appScreen .mc-action-excel:hover:not(:disabled){background:#105e38!important;border-color:#105e38!important}
body :is(.mc-action-delete,.mc-action-excel) :is(svg,i,span){color:inherit!important}
body :is(.mc-action-delete,.mc-action-excel):disabled,body :is(.mc-action-delete,.mc-action-excel)[aria-disabled="true"]{opacity:.45!important;cursor:not-allowed!important}
body :is(.mc-action-delete,.mc-action-excel):focus-visible{outline:2px solid currentColor;outline-offset:3px}
