/* Enterprise typography system — readable across every ERP module. */
:root{--type-xs:12px;--type-sm:13px;--type-base:14px;--type-md:16px;--type-card:18px;--type-section:20px;--type-page:24px;--type-leading:1.5}
html{font-size:var(--type-base);-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{font-size:var(--type-base);font-weight:400;line-height:var(--type-leading);text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased}
p,li,dt,dd,address,legend,.form-text,.text-muted{line-height:var(--type-leading)}
small,.small{font-size:var(--type-xs)!important;line-height:1.45}
h1,.h1,.page-title,.topbar h1{font-size:var(--type-page);line-height:1.25}
h2,.h2,.section-title{font-size:var(--type-section);line-height:1.3}
h3,.h3,.card-title,.panel h2,.panel h3{font-size:var(--type-card);line-height:1.35}
h4,.h4,.widget-title{font-size:var(--type-md);line-height:1.4}
h5,.h5,.modal-title{font-size:var(--type-card);line-height:1.4}
h6,.h6{font-size:var(--type-base);line-height:1.4}

/* Navigation */
.sidebar .nav-link,.sidebar-link-row .nav-link,.sidebar-tree-toggle{min-height:42px;padding-top:10px;padding-bottom:10px;font-size:var(--type-base);line-height:1.4}
.sidebar-tree-children .nav-link{font-size:var(--type-sm)}
.nav-heading{padding-top:12px;padding-bottom:12px;font-size:var(--type-xs);line-height:1.35}
.sidebar-search input{height:42px;font-size:var(--type-base)}
.sidebar-bottom a,.sidebar-bottom button{min-height:40px;font-size:var(--type-sm)}
.app-breadcrumb a,.breadcrumb,.breadcrumb-item{font-size:var(--type-sm);line-height:1.4}
.topbar p,.user-chip,.user-chip small,.dropdown-item,.dropdown-menu{font-size:var(--type-base)}
.nav-link,.nav-tabs .nav-link,.nav-pills .nav-link,.ess-profile-tabs .nav-link{font-size:var(--type-base)}

/* Forms and actions */
label,.form-label,.form-check-label,.form-check,.form-switch,.input-group-text{font-size:var(--type-base);line-height:1.45}
.form-control,.form-select,input,select,textarea{font-size:var(--type-base);line-height:1.5}
.form-control,.form-select{min-height:42px;padding-top:9px;padding-bottom:9px}
textarea.form-control{min-height:96px}
.form-control::placeholder,input::placeholder,textarea::placeholder{font-size:var(--type-sm);opacity:.78}
.form-text,.help-block,.invalid-feedback,.valid-feedback,.validation-error{font-size:var(--type-xs);line-height:1.45}
.btn,.button,button:not(.btn-close){min-height:40px;font-size:var(--type-base);line-height:1.35}
.btn-sm{min-height:34px;font-size:var(--type-sm)}
.select2-container,.select2-container .select2-selection,.select2-container .select2-selection__rendered,.select2-results__option{font-size:var(--type-base)!important;line-height:1.5!important}
.select2-container .select2-selection--single{min-height:42px}.select2-container--default .select2-selection--single .select2-selection__rendered{line-height:40px!important}

/* Tables and DataTables */
.table{font-size:var(--type-base);line-height:1.5}
.table>:not(caption)>*>*{padding:.75rem .85rem}
.table thead th,.table tfoot th,.table tfoot td,.dataTable thead th,.dataTable tfoot th{font-size:var(--type-base);line-height:1.4}
.table tbody td,.dataTable tbody td{font-size:var(--type-base);line-height:1.5}
.dataTables_wrapper,.dataTables_info,.dataTables_paginate,.dataTables_length,.dataTables_filter,.dt-container,.dt-info,.dt-paging,.dt-length,.dt-search{font-size:var(--type-sm)}
.dataTables_filter input,.dataTables_length select,.dt-search input,.dt-length select{min-height:38px;font-size:var(--type-base)}
.page-link,.pagination,.dataTables_paginate .paginate_button,.dt-paging-button{font-size:var(--type-sm)!important;line-height:1.4}
.dataTables_empty,.dataTables_processing,.dt-empty{font-size:var(--type-base)!important}
.dt-buttons .btn,.dt-button{font-size:var(--type-sm)!important}

/* Reusable surfaces */
.card,.panel,.modal-body,.modal-footer,.dropdown-menu,.alert,.toast,.offcanvas{font-size:var(--type-base)}
.card-title,.panel-title{font-size:var(--type-card)}
.modal-header{padding:18px 20px}.modal-body{line-height:1.5}.modal-footer .btn{font-size:var(--type-base)}
.badge,.status-badge,.sidebar-badge{font-size:var(--type-xs);line-height:1.35}
.tooltip,.tooltip-inner{font-size:var(--type-xs);line-height:1.4}
.timeline,.reception-timeline,.reception-timeline small{font-size:var(--type-sm);line-height:1.5}
.notification-item,.notification-feed,.notification-feed small{font-size:var(--type-sm);line-height:1.5}
.calendar,.calendar-grid,.calendar-day,.fc,.fc-event,.fc-daygrid-day-number{font-size:var(--type-sm)}
.quick-action,.quick-actions a,.ess-fab nav a{font-size:var(--type-base)}
footer,.footer,.app-footer{font-size:var(--type-xs)}

/* Dense reports still use the standard readable table scale. */
.party-table thead th,.party-ledger-table thead th,.ledger-report-table thead th,.reception-table thead th{font-size:var(--type-base)}
.party-table tbody td,.party-ledger-table tbody td,.ledger-report-table tbody td,.reception-table tbody td{font-size:var(--type-base)}
.metric-label,.stat-label,.widget-meta,.workday-eyebrow,.ess-page-head span,.party-ledger-title>span,.ledger-report-title>span{font-size:var(--type-xs)}
.metric-value,.stat-value{line-height:1.2}

@media(max-width:768px){html,body{font-size:var(--type-base)}.content{padding:18px 14px}.table{font-size:var(--type-base)}.modal-dialog{margin:.75rem}.sidebar .nav-link,.sidebar-link-row .nav-link,.sidebar-tree-toggle{font-size:var(--type-base)}h1,.h1,.page-title,.topbar h1{font-size:22px}h2,.h2,.section-title{font-size:19px}}
