/* Shared comfortable screen typography. PDFs and signature artwork are not
   affected. Relative units preserve browser text-size and zoom preferences. */
:root{--text-body:1rem;--text-ui:.875rem;--text-caption:.8125rem;--muted:#52677c;--dash-muted:#526d86;--shell-gutter:clamp(16px,2.4vw,32px)}
html{font-size:100%;scroll-padding-top:9rem}
body{font-size:var(--text-body);line-height:1.6}
/* Explicit floors override the older page-specific 8–11px declarations only
   for UI text. Large values, headings, icons and chosen signature fonts stay distinct. */
body :is(p,label,small,th,td,dt,dd,.eyebrow,.field-hint,.field-error,.cell-title,.cell-sub,.nav-item,.floating-menu-label,.text-button,.back-button,.status-badge,.record-type,.record-kpi>div>span,.record-kpi small span,.kpi-main span,.kpi-comparison,.kpi-comparison small,.dashboard-status-row,.dashboard-rank b,.dashboard-rank strong,.monthly-legend,.attention-item>b,.attention-item>strong,.attention-item>small,.attention-age,.list-meta,.pagination,.operations-pagination,.batch-toolbar,.batch-help,.signature-consent){font-size:var(--text-ui)!important;line-height:1.5}
body :is(button,.button){font-size:var(--text-ui)!important;line-height:1.4;min-height:2.75rem}
body :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=hidden]),select,textarea){font-size:var(--text-body)!important;line-height:1.5;min-height:2.75rem;min-width:0;max-width:100%}
body textarea{min-height:6.5rem}
body :is(h1,h2,h3,h4){line-height:1.3;overflow-wrap:anywhere}
body :is(.page-head h1,.dashboard-head h1){font-size:2rem}
body :is(.card-head h2,.form-section h2,.detail-block h3,.setting h2){font-size:1.125rem!important}
body :is(.page-head p,.operations-guide p,.detail-hero p){font-size:1rem!important}
body :is(.field-hint,.cell-sub,.card-head p,.operations-notice,.definition-grid dt){color:var(--muted)}
body :is(input,textarea)::placeholder{color:#586c80;opacity:1}
body :is(button,a,input,select,textarea,summary):focus-visible{outline:3px solid #006a78;outline-offset:3px}
body .button.primary{background:#007d85;border-color:#007d85;color:#fff}
body .button.primary:hover{background:#00646c;border-color:#00646c}
body .icon-button{min-width:2.5rem;min-height:2.5rem}
body :is(.form-grid label,.operations-form-grid>label){gap:.5rem}
body :is(th,td){padding:.875rem 1rem}
body th{letter-spacing:.025em;white-space:normal;color:#465e76}
body :is(.recent-card td,.recent-card th,.record-list-page td,.record-list-page th,.operations-shell td,.operations-shell th){padding:.875rem 1rem}
body :is(.cell-sub,.recent-card .cell-sub,.recent-description){white-space:normal;overflow-wrap:anywhere;max-width:28rem}
body .record-list-page .record-table-compact :is(th,td){padding:.625rem .75rem}
body :is(.dialog,.operations-dialog){max-height:calc(100dvh - 2rem);overflow-y:auto}
body .dialog-head{align-items:flex-start}
body .dialog-actions{flex-wrap:wrap}
body .dialog-actions .button{white-space:normal}
body .topbar{height:auto;min-height:4.75rem}
body .topbar-inner{min-height:4.75rem;gap:1rem}
body .topbar :is(.top-nav-link,.user-meta b){font-size:var(--text-ui)!important;min-height:2.75rem}
body .topbar .user-meta b{min-height:0}
body .topbar .brand b{font-size:1rem}
body .topbar :is(.brand small,.user-button small){font-size:var(--text-caption)!important;line-height:1.45}
body .topbar .header-search{min-height:2.75rem;flex:0 1 15rem}
body .topbar .header-search>input{min-height:1.75rem;font-size:var(--text-ui)!important}
body .floating-menu-label{color:#52677c}
body .floating-menu .nav-item{white-space:normal}
body .topbar .user-button .avatar{width:2.5rem;height:2.5rem;font-size:var(--text-ui)}
body .topbar .top-nav-link{padding:.625rem .75rem;white-space:nowrap}
body .main{padding-top:1.5rem}
body .dashboard-head-actions>span{font-size:var(--text-ui);color:var(--muted)}
body .dashboard-filters :is(select,.button){height:auto;min-height:2.75rem}
body [data-view=dashboard] .kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem}
body [data-view=dashboard] .kpi{padding:1.125rem;min-height:10rem}
body [data-view=dashboard] .kpi strong{font-size:1.75rem!important;margin:.5rem 0;white-space:normal;overflow-wrap:anywhere}
body :is(.kpi-main span,.kpi-comparison,.kpi-comparison small){white-space:normal}
body .kpi-main{gap:.875rem}
body [data-view=dashboard] .dashboard-grid{gap:1rem}
body [data-view=dashboard] .chart-card{padding:1.125rem;min-height:17rem}
body .dashboard-status-row{grid-template-columns:minmax(7.5rem,auto) minmax(0,1fr) 2rem 2.5rem}
body .dashboard-rank b{white-space:normal;overflow:visible;text-overflow:clip;text-transform:none}
body .monthly-chart svg{height:12rem}
body .monthly-chart text{font-size:12px}
body .attention-cards{grid-template-columns:repeat(2,minmax(0,1fr))}
body .attention-item{padding:1rem;min-height:8rem}
body .attention-item :is(b,strong,small){padding-right:0;white-space:normal;overflow:visible}
body .attention-item .attention-meta{position:static;margin-top:.75rem;flex-wrap:wrap}
body .attention-item .status-badge{max-width:none;white-space:normal;overflow:visible}
body .record-list-page .filter-row{grid-template-columns:repeat(4,minmax(0,1fr));gap:1rem}
body .record-list-page .filter-row :is(input,select,.button){height:auto;min-height:2.75rem}
body .record-kpi{gap:1rem;padding:1.125rem}
body .record-kpi strong,body .record-kpi:last-child strong{font-size:1.75rem;white-space:normal;overflow-wrap:anywhere}
body :is(.record-list-page .batch-help,.record-list-page .batch-toolbar,.record-list-page .list-meta){line-height:1.6}
body .operations-shell .page-head h1{font-size:2rem}
body .operations-dialog .operations-form-grid>label{font-size:var(--text-ui)}
body .login-shell{width:min(30rem,100%)}
body .login-card{padding:2rem}
@media(max-width:1260px){
 body .topbar-inner{flex-wrap:wrap;padding-top:.625rem;padding-bottom:.625rem;gap:.625rem 1rem}
 body .topbar .brand{order:0}body .topbar .brand>span{display:none}
 body .topbar .top-actions{order:1;margin-left:auto;max-width:none}
 body .topbar .header-search{order:2;margin-left:0}
 body .topbar .top-navigation{order:3;flex-basis:100%;margin:0;justify-content:center;flex-wrap:wrap;height:auto;border-top:1px solid #426077;padding-top:.5rem}
 body .topbar .user-meta{max-width:15rem}
 body .topbar .user-meta b,body .topbar .user-meta small{max-width:15rem}
 body .record-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
 body [data-view=dashboard] .dashboard-grid{grid-template-columns:1fr 1fr}
 body .monthly-card{grid-column:1/-1}
}
@media(max-width:750px){
 body .topbar{position:relative}
 body .topbar .notification-button{display:none}
 body .topbar .header-search{flex:1 0 100%;order:3}
 body .topbar .top-navigation{order:2;justify-content:flex-start}
 body .topbar .top-nav-link{padding:.5rem .625rem}
 body .topbar .user-meta,body .topbar .user-meta b,body .topbar .user-meta small{max-width:11rem}
 body [data-view=dashboard] :is(.dashboard-grid,.kpi-grid){grid-template-columns:1fr}
 body :is(.attention-cards,.dashboard-pending-dialog .attention-cards){grid-template-columns:1fr}
 body .monthly-card{grid-column:auto}
 body .record-list-page .filter-row{grid-template-columns:repeat(2,minmax(0,1fr))}
 body .dashboard-filters{grid-template-columns:1fr}
 body .dashboard-filters label+label{border:0;padding-left:0}
 body .dashboard-head{align-items:stretch}
 body .dashboard-head-actions{align-items:flex-start;gap:.625rem}
 body .record-kpis{grid-template-columns:1fr}
 body .operations-shell .page-head h1,body :is(.page-head h1,.dashboard-head h1){font-size:1.75rem}
 body .dialog-actions .button{flex:1 1 10rem}
 body .login-card{padding:1.25rem}
}
@media(max-width:400px){
 body .record-list-page .filter-row{grid-template-columns:1fr}
 body .topbar .brand img{width:56px;height:32px}
 body .topbar .user-button{gap:6px;padding:0}
 body .topbar .user-button .avatar{width:2rem;height:2rem}
 body .topbar .user-meta,body .topbar .user-meta b,body .topbar .user-meta small{max-width:7rem}
 body .topbar .user-meta b,body .topbar .user-meta small{white-space:normal;overflow-wrap:anywhere}
 body .dashboard-status-row{grid-template-columns:7rem minmax(0,1fr) 1.75rem 2.25rem;gap:.375rem}
}
