:root{
  --ui-font:"Segoe UI",Arial,sans-serif;
  --text-base:16px;
  --text-ui:15px;
  --text-small:13.5px;
  --text-h3:17px;
  --text-h2:20px;
  --text-h1:30px;
}

/* One font stack for the entire application. */
html,body,button,input,select,textarea,option,table,summary,details{
  font-family:var(--ui-font)!important;
}

body{
  font-size:var(--text-base)!important;
  line-height:1.55;
  text-rendering:optimizeLegibility;
  -webkit-font-smoothing:antialiased;
}

/* Main hierarchy */
h1,.page-head h1{
  font-size:var(--text-h1)!important;
  line-height:1.22!important;
  font-weight:650!important;
}
h2,.panel-head h2{
  font-size:var(--text-h2)!important;
  line-height:1.3!important;
  font-weight:650!important;
}
h3{
  font-size:var(--text-h3)!important;
  line-height:1.35!important;
  font-weight:650!important;
}

/* Core UI text */
p,li,dd,td,
.page-head p,
.op-description,
.notice,
.history-row,
.details>div{
  font-size:var(--text-ui)!important;
}

a,button,.button,
input,select,textarea,
label,summary,
.tabs a,
.nav-link,
.segmented a,
.pager{
  font-size:var(--text-ui)!important;
}

/* Secondary text never drops below 13px */
small,
.muted,
.fine,
.field-error,
.reference,
.badge,
th,dt,legend,
.eyebrow,
.nav-label,
.topbar-label,
.sidebar-foot,
.footer,
.profile-role,
.company-badge,
.employee-identity small,
.vehicle-identity small,
.timeline-time,
.audit-metadata,
.select-vehicle,
.late-note{
  font-size:var(--text-small)!important;
  line-height:1.45;
}

/* Common identity and navigation text */
.brand{font-size:16px!important}
.brand small{font-size:var(--text-small)!important}
.employee-identity strong,
.vehicle-identity strong{font-size:var(--text-ui)!important}
.header-search input{font-size:var(--text-ui)!important}
.button.small{font-size:var(--text-small)!important}

/* Tables */
table{font-size:var(--text-ui)!important}
th{font-size:var(--text-small)!important}
td{font-size:var(--text-ui)!important}
td small{font-size:var(--text-small)!important}

/* KPI hierarchy */
.metric-label{font-size:var(--text-ui)!important}
.metric small,.metric-hint{font-size:var(--text-small)!important}
.metric>strong,.metric-value{font-size:34px!important}

/* Panels and cards: normalize the dozens of legacy tiny declarations. */
main :where(
  .panel,
  .fleet-card,
  .ops-lane,
  .op-card,
  .settings-workspace,
  .pricing-rate-panel,
  .pricing-policy-bar,
  .pricing-summary-strip,
  .maintenance-due-card,
  .incident-event,
  .request-cell,
  .route-board-card,
  .route-waiting-main,
  .presentation-summary,
  .rental-approval-card
) :where(p,span,small,strong,label,legend,summary,a,button,td,th,dt,dd,time){
  font-size:var(--text-ui)!important;
  line-height:1.45;
}

/* Keep secondary labels visually secondary while still readable. */
main :where(
  .panel,
  .fleet-card,
  .ops-lane,
  .settings-workspace,
  .pricing-rate-panel,
  .pricing-policy-bar,
  .maintenance-due-card,
  .incident-event
) :where(.eyebrow,.muted,small,th,dt){
  font-size:var(--text-small)!important;
}

/* Settings */
.settings-section-head h2{font-size:var(--text-h2)!important}
.settings-subcard-head h3,
.settings-governance-title h3,
.settings-access-section-head h3{font-size:var(--text-h3)!important}
.settings-user-table-head,
.settings-user-status,
.settings-user-edit,
.settings-company-primary,
.settings-company-status,
.settings-company-edit-label,
.settings-approver-badge,
.settings-log-count{
  font-size:var(--text-small)!important;
}

/* Trip pricing */
.pricing-policy-intro>strong,
.pricing-location-display strong,
.pricing-value,
.pricing-editor-meta strong,
.pricing-toggle>strong{
  font-size:var(--text-ui)!important;
}
.pricing-policy-facts strong{font-size:16px!important}
.pricing-summary-strip strong{font-size:18px!important}
.pricing-rate-table th,
.pricing-rate-table th small,
.pricing-status,
.pricing-value-missing,
.pricing-not-configured,
.pricing-more>summary,
.pricing-more button{
  font-size:var(--text-small)!important;
}
.pricing-popover-shell h2{font-size:var(--text-h2)!important}

/* Operations, incidents, maintenance and request cards */
.op-route strong,
.op-route small,
.op-load,
.op-timeline time,
.op-timeline small,
.op-timeline strong,
.op-timeline p,
.op-timeline summary,
.incident-copy strong,
.incident-copy p,
.incident-attachment-row strong,
.incident-attachment-row span,
.incident-event-time,
.incident-event strong,
.incident-event small,
.incident-event p,
.incident-history-row strong,
.incident-history-row span,
.simple-journey-flow strong,
.simple-journey-role,
.simple-journey-fields label,
.trip-cost-total span,
.trip-cost-override-note strong,
.trip-cost-override-note span,
.trip-cost-unpriced strong,
.trip-cost-unpriced span,
.trip-cost-editor>summary,
.request-location-card__head strong,
.request-location-grid label,
.request-location-extra__head strong,
.request-location-extra__head span,
.request-extra-stop__head strong,
.request-extra-stop-grid label,
.rental-ceo-chip span,
.rental-approval-summary span,
.rental-type-badge,
.rental-approval-reason strong,
.rental-approval-reason p,
.rental-long-term-grid strong,
.rental-long-term-grid p{
  font-size:var(--text-ui)!important;
}

/* Locations */
.locations-table th{font-size:var(--text-small)!important}
.locations-table td{font-size:var(--text-ui)!important}
.locations-table td small{font-size:var(--text-small)!important}
.location-popover-head h2{font-size:var(--text-h2)!important}

/* Login */
.login-company,
.login-categories,
.login-label-row a,
.login-security,
.login-footer,
.login-error,
.login-feedback,
.caps-warning{
  font-size:var(--text-small)!important;
}
.login-description{font-size:var(--text-ui)!important}
.login-panel h2{font-size:24px!important}
.login-input input{font-size:16px!important}

/* Driver Mobile uses the same font and readable minimums. */
.driver-app,
.driver-app button,
.driver-app input,
.driver-app select,
.driver-app textarea{
  font-family:var(--ui-font)!important;
}
.driver-app small{font-size:var(--text-small)!important}

/* Technical content intentionally remains monospace. */
code,pre,.op-json,.audit-metadata{
  font-family:Consolas,"Courier New",monospace!important;
  font-size:var(--text-small)!important;
}

/* Decorative vehicle plate is a visual object, not body UI text. */
.vehicle-plate .plate-heading{font-size:9px!important}
.vehicle-plate .plate-heading b{font-size:11px!important}
.vehicle-plate .plate-digits{font-size:20px!important}

/* Keep mobile readable; never shrink typography for small screens. */
@media(max-width:700px){
  :root{
    --text-base:15px;
    --text-ui:14px;
    --text-small:13px;
    --text-h3:16px;
    --text-h2:18px;
    --text-h1:26px;
  }
}

/* High-specificity legacy overrides from enterprise-ui.css */
.route-board-facts dt,
.route-board-facts dd,
.op-timeline time,
.enterprise-summary-grid .route-summary-card>small,
.presentation-count-grid span,
.presentation-password span,
.presentation-login-row span,
.presentation-password code,
.presentation-login-row code,
.enterprise-summary-grid .route-summary-card--vehicle .vehicle-identity strong,
.enterprise-summary-grid .route-summary-card--vehicle .route-vehicle-copy strong,
.enterprise-summary-grid .route-summary-card--vehicle .route-vehicle-copy small{
  font-size:var(--text-small)!important;
}

.enterprise-summary-grid .route-summary-card--vehicle .vehicle-identity strong,
.enterprise-summary-grid .route-summary-card--vehicle .route-vehicle-copy strong{
  font-size:var(--text-ui)!important;
}

/* Adaptive UAE plate city labels */
.vehicle-plate .plate-heading{gap:2px!important;padding-left:4px!important;padding-right:4px!important}
.vehicle-plate .plate-city{display:block;min-width:0;max-width:44%;overflow:hidden;white-space:nowrap!important;text-overflow:clip;line-height:1!important;letter-spacing:-.12px}
.vehicle-plate .plate-city-ar{font-size:var(--plate-ar-size,5.8px)!important;font-weight:650}
.vehicle-plate .plate-city-en{font-size:var(--plate-en-size,5.3px)!important;font-weight:700}

/* Sidebar product title wrapping */
.sidebar .brand{font-size:15px!important;line-height:1.25!important;align-items:flex-start!important}
.sidebar .brand>span{max-width:126px;display:block}
.sidebar .brand small{margin-top:3px;line-height:1.2!important}
