/* Final clean parity layer.
   Mirrors the last production cleanup/typography layers (overlay96/99/100/105)
   without depending on any legacy overlay runtime. Loaded last by clean/index.html. */

/* Final production readability baseline. */
body{font-size:16px!important;line-height:1.5!important}
button,input,select,textarea{font-size:14px!important}
.page{font-size:16px!important}
table td{font-size:15px!important;line-height:1.5!important}
table th{font-size:13px!important;line-height:1.4!important}
small,.muted,.sub{font-size:13px!important;line-height:1.45!important}
label,.label{font-size:14px!important}

/* Route headers keep one human title; redundant brand/kicker copy is not rendered. */
.page>section>header .kicker{display:none!important}

/* Close the remaining micro-text gaps in operational surfaces. */
.directory-name b{font-size:14px!important}
.directory-advanced>summary{font-size:13px!important;line-height:1.4!important}
.status{min-height:24px!important;font-size:12px!important;line-height:1.25!important}
.mobile-directory-row em{font-size:13px!important;line-height:1.4!important}
.settings-panel .panel-sub,.integration-card div{font-size:13px!important;line-height:1.45!important}
.tag{font-size:12px!important;line-height:1.25!important}
.payment-safety{font-size:13px!important;line-height:1.45!important}
.invoice-modes b,.invoice-overview-metric strong,.inv-pill{font-size:13px!important;line-height:1.3!important}
.auto-driver-picker-head span,.review-line-field>span{font-size:13px!important;line-height:1.4!important}

/* Team final readability overrides the older compact video-density rule. */
.team-table td{font-size:14px!important;line-height:1.45!important}
.team-table th{font-size:12px!important;line-height:1.4!important}
.member-main b{font-size:14px!important}
.member-main small{font-size:12px!important;line-height:1.4!important}
.team-stat small,.team-msg,.permission-grid>span{font-size:13px!important;line-height:1.4!important}
.team-table select{font-size:14px!important}

/* Dashboard final typography: keep the compact composition, not tiny text. */
.dash-auto-actions button{font-size:14px!important}
.dash-flow small{font-size:13px!important}
.dash-flow b{font-size:22px!important}
.dash-kpis small{font-size:13px!important}
.dash-kpis b{font-size:25px!important}
.dash-list>header{font-size:14px!important}
.dash-list>header button{font-size:13px!important}
.dash-list-row b{font-size:14px!important}
.dash-list-row small{font-size:13px!important}
.dash-list-row strong{font-size:14px!important}
.dash-attention h3{font-size:14px!important}
.dash-attention p{font-size:13px!important}
.dash-attention-grid small{font-size:13px!important}
.dash-chart-head b{font-size:14px!important}
.dash-chart-head strong{font-size:16px!important}
.dash-chart-title{display:flex!important;align-items:baseline!important;gap:10px!important;flex-wrap:wrap!important;min-width:0}
.dash-chart-title b,.dash-chart-title strong{display:block!important}
.dash-chart-head>small{margin-left:auto!important;text-align:right!important}
.dash-flow .dash-flow-status{position:relative;min-height:66px;padding:8px 9px;border:1px solid var(--line);border-radius:11px;background:linear-gradient(145deg,var(--surface),var(--surface2));text-align:left;cursor:default}

/* Auto Invoice final production text density. */
.invoice-overview header small,.invoice-overview-metric span{font-size:13px!important}
.invoice-overview-metric b{font-size:22px!important}
.invoice-overview-actions button,.invoice-modes button,.inv-open{font-size:14px!important}
.invoice-table th{font-size:13px!important}
.invoice-table td{font-size:15px!important}
.invoice-table td small{font-size:13px!important}
.invoice-form label,.invoice-review label{font-size:14px!important}

/* Finance overlay99 was the final production authority and intentionally enlarged this page. */
.fin-route{font-size:16px!important;line-height:1.5!important}
.fin-head h1{font-size:32px!important}
.fin-kpi{min-height:108px!important;padding:18px!important}
.fin-kpi small{font-size:13px!important;line-height:1.45!important}
.fin-kpi b{font-size:24px!important;line-height:1.2!important}
.fin-kpi span{font-size:13px!important}
.fin-panel h2{font-size:22px!important}
.fin-mini{font-size:15px!important}
.fin-mini small{font-size:13px!important}
.fin-mini b{font-size:15px!important}
.fin-table td{font-size:15px!important;line-height:1.5!important}
.fin-table th{font-size:13px!important}
.fin-route button,.fin-route input,.fin-route select{font-size:14px!important}

/* Settings owner-control readability. */
.settings-section-title{font-size:13px!important}
.settings-panel h2{font-size:18px!important}
.settings-form label,.settings-link b{font-size:14px!important}
.settings-panel .panel-sub,.settings-note,.settings-link small,.eld-main small,.eld-cost small{font-size:13px!important}

/* Frozen production keeps Calls/Documents available through Quick Add, not as duplicate top actions. */
.res-route:has(.res-cards) .res-head .primary{display:none!important}

/* Final production page headers do not repeat the title as descriptive chrome. */
.tasks-head>div>p,.companies-head>div>p,.team-head>div>p,.audit-head>div>p,.settings-head>div>p,
.res-head>div>p,.fin-head>div>p,.invoice-head>div>p,.payments-head>div>p,.leads-head>div>p,.chat-head>div>p{display:none!important}

/* iPhone/PWA hardening: preserve bottom-nav safe area and prevent focus zoom on form controls. */
@media(max-width:900px){
  .mobile-nav{height:calc(62px + env(safe-area-inset-bottom))!important;padding-bottom:env(safe-area-inset-bottom)!important}
  .page{padding-bottom:calc(82px + env(safe-area-inset-bottom))!important}
  .fab-stack{right:14px!important;bottom:calc(78px + env(safe-area-inset-bottom))!important}
  .quick-add-menu{right:14px!important;bottom:calc(194px + env(safe-area-inset-bottom))!important}
  input,select,textarea,.fin-route input,.fin-route select{font-size:16px!important}
  .dash-flow .dash-flow-status{flex:0 0 115px}
  .topbar{padding:0 10px!important;gap:7px!important}
  .topbar>.spacer,.lang-control{display:none!important}
  .global-search{flex:1 1 0!important;width:auto!important;min-width:0!important}
  .top-relative{flex:0 0 auto}
  .profile{display:flex!important;width:38px!important;min-width:38px!important;max-width:38px!important;padding:3px!important;justify-content:center!important;border-color:var(--line)!important;background:var(--surface)!important}
  .profile>span:not(.avatar){display:none!important}
  .push-control{display:inline-flex!important;align-items:center!important;justify-content:center!important;width:64px!important;min-width:64px!important;padding:0 6px!important;font-size:12px!important}
}

@media(max-width:760px){
  body,.page{font-size:17px!important}
  .dash-flow small,.dash-kpis small{font-size:14px!important}
  .fin-route{font-size:17px!important}
  .fin-kpi small{font-size:14px!important}
  .team-table td{font-size:14px!important}
  .team-table th,.member-main small{font-size:12px!important}
  .dash-chart-head{align-items:flex-start!important;gap:8px!important}
  .dash-chart-head>small{margin-left:0!important;text-align:left!important}
}

@media(max-width:620px){
  .dash-flow .dash-flow-status{min-width:0;width:auto;flex:auto}
}

@media(max-width:520px){
  .dash-chart-title{display:grid!important;gap:4px!important}
  .topbar{padding:0 8px!important;gap:6px!important}
  .icon-btn{width:34px!important;min-width:34px!important}
  .profile{width:34px!important;min-width:34px!important;max-width:34px!important}
  .profile .avatar{width:28px!important;height:28px!important}
  .push-control{width:58px!important;min-width:58px!important;padding:0 4px!important;font-size:11px!important}
}

/* Stage 15/16 re-audit: canonical component readability/spacing. */