/* EstateScale shared screen theme. Load last in the shell and every module.
   Documents, editor canvases and print output keep their own typography/layout. */
@media screen {
html[data-estate-theme="shared"] {
 --es-primary:#2563EB; --es-primary-hover:#1D4ED8; --es-primary-soft:#EFF6FF;
 --es-secondary:#38BDF8; --es-surface-muted:#F1F5F9; --es-primary-ink:#ffffff; --es-canvas:#F8FAFC; --es-surface:#ffffff;
 --es-text:#0F172A; --es-text-muted:#64748B; --es-border:#E2E8F0;
 --es-chrome:#FFFFFF; --es-chrome-text:#0F172A; --es-selected:#2563EB;
 --es-focus:#38BDF8; --es-shadow:0 2px 8px #192b4108;
 --es-radius-control:8px; --es-radius-panel:12px;
 --es-sans:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
 /* Compatibility aliases for the existing independent module styles. */
 --es-paper:var(--es-canvas); --es-white:var(--es-surface); --es-ink:var(--es-text);
 --es-muted:var(--es-text-muted); --es-line:var(--es-border);
 --es-green:var(--es-primary); --es-copper:var(--es-primary); --es-soft:var(--es-primary-soft);
 --bg:var(--es-canvas)!important; --page:var(--es-canvas)!important;
 --panel:var(--es-surface)!important; --card-bg:var(--es-surface)!important;
 --ink:var(--es-text)!important; --text:var(--es-text)!important;
 --muted:var(--es-text-muted)!important; --line:var(--es-border)!important;
 --line2:var(--es-border)!important; --border:var(--es-border)!important;
 --accent:var(--es-primary)!important; --accent-dark:var(--es-primary-hover)!important;
 --accent-soft:var(--es-primary-soft)!important; --accent-ink:#fff!important;
 --primary:var(--es-primary)!important; --primary-hover:var(--es-primary-hover)!important;
 --hover:var(--es-primary-soft)!important; --brand-200:var(--es-border)!important; --desk:var(--es-surface-muted)!important;
 --shadow:var(--es-shadow)!important; --ui:var(--es-sans)!important;
 --acc-ink:var(--es-text)!important; --acc-muted:var(--es-text-muted)!important;
 --acc-line:var(--es-border)!important; --acc-blue:var(--es-primary)!important;
 --tally-teal:var(--es-primary)!important; --tally-dark:var(--es-chrome)!important;
 --tally-gold:var(--es-primary)!important; --tally-accent:var(--es-primary-soft)!important;
}
html[data-estate-theme="shared"] body {font-family:var(--es-sans)!important;background:var(--es-canvas)!important;color:var(--es-text)!important}
/* The :not() guard includes descendants, so document contents are never reset. */
html[data-estate-theme="shared"] :is(button,input,select,textarea):not(:where(.es-preserve-document,.es-preserve-document *,#paperSheet,#paperSheet *,#printRoot,#printRoot *,#printArea,#printArea *,#sheet,#sheet *,#bankPreprinted,#bankPreprinted *,#printableReportArea,#printableReportArea *,#printableVoucherArea,#printableVoucherArea *,.a4,.a4 *,.page-sheet,.page-sheet *,.paper-sheet,.paper-sheet *,.document-page,.document-page *,.office-document,.office-document *,[contenteditable="true"],[contenteditable="true"] *)) {font-family:var(--es-sans)!important}
html[data-estate-theme="shared"] :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=hidden]):not([type=file]),select,textarea):not(:where(.es-preserve-document *,.a4 *,.page-sheet *,#paperSheet *,#printRoot *,#printArea *,#sheet *,#bankPreprinted *,#printableReportArea *,#printableVoucherArea *,.office-document *)) {background:var(--es-surface)!important;color:var(--es-text)!important;border-color:var(--es-border)!important;border-radius:var(--es-radius-control)!important;font-size:14px;line-height:1.5;accent-color:var(--es-primary)}
html[data-estate-theme="shared"] :is(input[type=checkbox],input[type=radio]) {accent-color:var(--es-primary)}
html[data-estate-theme="shared"] :is(button,a,input,select,textarea,summary):focus-visible {outline:3px solid var(--es-focus)!important;outline-offset:3px}
/* Primary action aliases. Red/delete and amber/warning variants are not included. */
html[data-estate-theme="shared"] :is(.es-btn:not(.secondary),button.primary,.btn.primary,.btn-primary,.btn-ai,.fm-primary,.pipeline-new,button.bg-brand-500,button.bg-brand-600,button.bg-brand-700,button.bg-indigo-500,button.bg-indigo-600,button.bg-blue-600,button.bg-sky-600,button.bg-emerald-600,button.bg-teal-600):not(:where(.es-preserve-document *,.a4 *,.page-sheet *,#paperSheet *,#printRoot *,#printArea *,#sheet *,#bankPreprinted *,#printableReportArea *,#printableVoucherArea *)) {background:var(--es-primary)!important;background-image:none!important;border-color:var(--es-primary)!important;color:var(--es-primary-ink)!important;border-radius:var(--es-radius-control)!important}
html[data-estate-theme="shared"] :is(.es-btn:not(.secondary),button.primary,.btn.primary,.btn-primary,.btn-ai,.fm-primary,.pipeline-new,button.bg-brand-600,button.bg-indigo-600,button.bg-blue-600,button.bg-sky-600):hover:not(:disabled) {background:var(--es-primary-hover)!important;border-color:var(--es-primary-hover)!important;filter:none}
html[data-estate-theme="shared"] :is(.tab-btn.text-indigo-600,.tab-btn.border-indigo-600,.module-function-tabs .border-indigo-500) {color:var(--es-primary)!important;border-color:var(--es-primary)!important}
html[data-estate-theme="shared"] :is(.office-tabs button[aria-current=page],.pipeline-view-toggle [aria-pressed=true],.pipeline-stage-filters [aria-pressed=true]) {background:var(--es-primary-soft)!important;color:var(--es-primary-hover)!important;border-color:var(--es-border)!important;box-shadow:none}
html[data-estate-theme="shared"] :is(.es-btn,.btn-primary,.fm-primary,.pipeline-new,.projects-editor button,.crm-projects button,.office-editor button,.office-studio button,.folder-manager button) {border-radius:var(--es-radius-control)!important;transition:background-color .16s,border-color .16s}
html[data-estate-theme="shared"] :is(.crm-projects,.crm-pipeline,.folder-manager,.office-studio,.office-editor,.fm-confirm,.projects-editor,.es-wa-panel) {font-family:var(--es-sans)!important;color:var(--es-text)!important;background:var(--es-canvas)!important}
html[data-estate-theme="shared"] :is(.project-card,.property-card,.pipeline-card,.office-card,.module-context,.card,.panel):not(:where(.es-preserve-document,.es-preserve-document *,.a4,.a4 *,.page-sheet,.page-sheet *,#paperSheet,#paperSheet *,#printRoot,#printRoot *,#printArea,#printArea *,#sheet,#sheet *)) {background-color:var(--es-surface)!important;border-color:var(--es-border)!important;box-shadow:var(--es-shadow)}
html[data-estate-theme="shared"] :is(.pipeline-lane,.pipeline-view-toggle,.preview-pane) {background:var(--es-surface-muted)!important}
html[data-estate-theme="shared"] :is(.pipeline-header h1,.crm-projects h1,.office-studio h1,.folder-manager h1) {color:var(--es-text)!important;font-family:var(--es-sans)!important;font-size:28px!important;line-height:1.25!important;letter-spacing:-.5px}
html[data-estate-theme="shared"] :is(.pipeline-count,#activePathLabel,.es-transfer-status) {background:var(--es-primary-soft)!important;color:var(--es-primary-hover)!important;border-color:var(--es-border)!important}
html[data-estate-theme="shared"] #view-leadmaster {--lm-accent:var(--es-primary);--lm-soft:var(--es-primary-soft);background:var(--es-canvas)!important;border-top:0!important;border-radius:var(--es-radius-panel)}
html[data-estate-theme="shared"] #view-leadmaster .lm-card {background:var(--es-surface)!important;border-color:var(--es-border)!important}
html[data-estate-theme="shared"] :is(#product-header,.module-context,.sidebar-header,.preview-toolbar) {border-color:var(--es-border)!important}
html[data-estate-theme="shared"] #product-sidebar {background:var(--es-chrome)!important;color:var(--es-chrome-text)!important}
html[data-estate-theme="shared"] #product-sidebar .nav-item[aria-current=page] {background:var(--es-selected)!important;color:#ffffff!important}
html[data-estate-theme="shared"] #product-sidebar :focus-visible {outline-color:var(--es-focus)!important}
html[data-estate-theme="shared"] :is(.es-mark:not(:has(.firm-logo)),.card-icon,.assistant-action) {background:var(--es-primary-soft)!important;color:var(--es-primary)!important}
html[data-estate-theme="shared"] .es-wa-panel button {background:var(--es-primary);border-color:var(--es-primary);border-radius:var(--es-radius-control)}
html[data-estate-theme="shared"] .es-wa-panel .wa-list button {background:var(--es-surface-muted);color:var(--es-text)}
html[data-estate-theme="shared"] .es-wa-panel .wa-list button[aria-pressed=true] {background:var(--es-primary);color:white}
html[data-estate-theme="shared"] :is(.bg-brand-50,.bg-brand-100,.bg-indigo-50,.bg-indigo-100):not(:where(#product-sidebar *,#paperSheet,#paperSheet *,#printRoot,#printRoot *,#printArea,#printArea *,#sheet,#sheet *,#bankPreprinted,#bankPreprinted *,#printableReportArea,#printableReportArea *,#printableVoucherArea,#printableVoucherArea *,.a4,.a4 *,.page-sheet,.page-sheet *,.es-preserve-document,.es-preserve-document *)) {background-color:var(--es-primary-soft)!important}
html[data-estate-theme="shared"] :is(.text-brand-500,.text-brand-600,.text-brand-700,.text-brand-800,.text-indigo-500,.text-indigo-600,.text-indigo-700,.text-indigo-800):not(:where(#product-sidebar *,#paperSheet,#paperSheet *,#printRoot,#printRoot *,#printArea,#printArea *,#sheet,#sheet *,#bankPreprinted,#bankPreprinted *,#printableReportArea,#printableReportArea *,#printableVoucherArea,#printableVoucherArea *,.a4,.a4 *,.page-sheet,.page-sheet *,.es-preserve-document,.es-preserve-document *)) {color:var(--es-primary)!important}
html[data-estate-theme="shared"] :is(.border-brand-100,.border-brand-200,.border-brand-300,.border-indigo-100,.border-indigo-200,.border-indigo-300):not(:where(#product-sidebar *,#paperSheet,#paperSheet *,#printRoot,#printRoot *,#printArea,#printArea *,#sheet,#sheet *,#bankPreprinted,#bankPreprinted *,#printableReportArea,#printableReportArea *,#printableVoucherArea,#printableVoucherArea *,.a4,.a4 *,.page-sheet,.page-sheet *,.es-preserve-document,.es-preserve-document *)) {border-color:var(--es-border)!important}
/* Numeric columns retain their existing alignment; a shared header/border treatment
   avoids changing ledger layout or the meaningful colours of status cells. */
html[data-estate-theme="shared"] table:not(:where(.es-preserve-document *,.a4 *,.page-sheet *,#paperSheet *,#printRoot *,#printArea *,#sheet *,#bankPreprinted *,#printableReportArea *,#printableVoucherArea *)) {border-color:var(--es-border)}
html[data-estate-theme="shared"] :is(#main-content,.office-studio,.folder-manager,.es-module) thead:not(:where(.es-preserve-document *,.a4 *,.page-sheet *,#paperSheet *,#printRoot *,#printArea *,#sheet *,#printableReportArea *,#printableVoucherArea *)) {background:var(--es-surface-muted)!important;color:var(--es-text-muted)!important}
}
@media screen and (max-width:767px) {
 html[data-estate-theme="shared"] :is(input,select,textarea):not(:where(.es-preserve-document *,.a4 *,.page-sheet *,#paperSheet *,#printRoot *,#printArea *,#sheet *)) {font-size:16px!important}
 html[data-estate-theme="shared"] :is(.es-btn,.btn-primary,.fm-primary,.pipeline-new,button.primary) {min-height:44px}
 html[data-estate-theme="shared"] :is(.pipeline-header h1,.crm-projects h1,.office-studio h1,.folder-manager h1) {font-size:24px!important}
}
@media screen and (prefers-reduced-motion:reduce) {
 html[data-estate-theme="shared"] :is(button,a,input,select,textarea) {transition:none!important}
}
