/* FleetFlow mobile specification alignment. Loaded last to harmonise existing screens without replacing their layouts or visual identity. */
:root{
  --font-display-xl:32px;--font-display-lg:28px;--font-h1:24px;--font-h2:20px;--font-h3:18px;--font-h4:16px;
  --font-body-lg:16px;--font-body-md:14px;--font-body-sm:13px;--font-label:12px;--font-caption:11px;
  --screen-padding-x:15px;--screen-padding-y:16px;--screen-bottom-padding:100px;
  --screen-section-gap:24px;--header-content-gap:24px;--component-gap:12px;--related-gap:8px;
  --card-padding:16px;--card-padding-compact:12px;--card-padding-large:20px;--card-gap:12px;
  --input-height:48px;--input-padding-x:12px;--form-field-gap:16px;--form-label-gap:8px;
  --button-height:48px;--button-height-secondary:44px;--button-padding-x:16px;
  --navigation-icon-size:22px;--navigation-label-size:10px;
}
/* Screen canvas and consistent page rhythm */
#viewScroll,.view-scroll{padding:16px 15px 100px!important;min-width:0;min-height:0;overflow-x:hidden}
.ref-page{min-width:0;width:100%;padding:0;margin:0}
.ref-heading,.page-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;min-height:66px;margin:0 0 24px!important}
.ref-heading>div:first-child,.page-heading>div:first-child{min-width:0;flex:1 1 auto}
.ref-heading .eyebrow,.page-heading .eyebrow{font-size:11px;line-height:16px;margin:0 0 4px;letter-spacing:1px}
.ref-heading .page-title,.page-heading .page-title,.ref-page>.page-title{font-size:24px;line-height:32px;font-weight:700;letter-spacing:-.55px;margin:0;overflow-wrap:anywhere}
.ref-heading .page-subtitle,.page-heading .page-subtitle{font-size:13px;line-height:18px;font-weight:400;margin-top:4px}
.ref-heading-actions{height:40px;min-height:40px;align-self:flex-start;margin:0 0 0 auto;gap:12px}
.ref-alert-button{width:34px;height:40px;flex:0 0 34px}
.ref-alert-button svg{width:20px;height:20px}
.ref-heading-actions .ref-avatar{width:36px;height:36px;flex:0 0 36px}
.ref-page>.eyebrow{font-size:11px;line-height:16px;margin:0 0 4px}
.ref-page>.page-title{font-size:24px;line-height:32px;font-weight:700;margin:0 0 20px}
.ref-back,.client-back{min-height:32px;font-size:13px;margin:0 0 8px}
.section-head,.ref-section-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:24px 0 12px}
.section-title,.ref-section-head>b{font-size:18px;line-height:24px;font-weight:600;letter-spacing:-.2px}
.ref-section-head button,.text-link{font-size:12px;font-weight:600;line-height:16px}
.home-screen .ref-heading{margin-bottom:24px!important}
.home-screen .ref-hero{margin-top:0}
.home-screen .ref-stats{gap:12px;margin:12px 0 24px}
.home-screen .ref-stat{min-height:112px;padding:12px;gap:0}
.home-screen .ref-stat>b{font-size:28px;line-height:36px;font-weight:700;font-variant-numeric:tabular-nums}
.home-screen .ref-stat>span{font-size:12px;line-height:16px;font-weight:500;margin-top:5px}
.home-screen .ref-stat>svg{width:18px;height:18px;margin-bottom:8px}
.home-screen .ref-hero{padding:20px;margin-bottom:12px}
.home-screen .ref-hero>div strong{font-size:32px;line-height:40px;font-variant-numeric:tabular-nums}
.home-screen .ref-hero>span{font-size:11px;line-height:16px}
.home-screen .ref-card{padding:16px;margin-bottom:12px}
.home-screen .ref-card .ref-between>b{font-size:14px;line-height:20px;font-weight:600}
.home-screen .ref-card p{font-size:12px;line-height:18px;margin-top:4px}
.home-screen .ref-section-head{margin:24px 0 12px}
/* Cards, lists and information hierarchy */
.ref-card,.record-card,.panel,.stat-card,.more-item{box-sizing:border-box}
.ref-card,.record-card,.panel{padding:16px;margin-bottom:12px;border-radius:var(--radius,17px)}
.ref-card:last-child,.record-card:last-child{margin-bottom:0}
.ref-between{gap:8px}
.ref-between>b,.ref-card>.ref-between>b{font-size:16px;line-height:24px;font-weight:600;min-width:0;overflow-wrap:anywhere}
.ref-card p,.ref-card .ref-next,.ref-card small{font-size:13px;line-height:18px}
.ref-client-road,.vehicle-meta-row{gap:12px}
.ref-client-road span,.vehicle-meta{font-size:13px;line-height:18px}
.vehicle-meta svg,.ref-client-road svg{width:18px;height:18px}
.ref-stats,.stats-grid,.compliance-stats{column-gap:12px;row-gap:12px}
.ref-stat,.stat-card{padding:12px;min-width:0}
.ref-stat>b,.ref-stat strong{font-size:24px;line-height:32px;font-weight:700;font-variant-numeric:tabular-nums}
.ref-stat>span{font-size:12px;line-height:16px}
.stat-label{font-size:12px;line-height:16px;font-weight:500}
.stat-value{font-size:28px;line-height:36px;font-weight:700;font-variant-numeric:tabular-nums}
.stat-foot{font-size:11px;line-height:16px}
.record-title,.mini-title{font-size:14px;line-height:20px;font-weight:600;overflow-wrap:anywhere}
.record-meta,.mini-sub{font-size:12px;line-height:18px;overflow-wrap:anywhere}
.field-label{font-size:12px;line-height:16px;font-weight:500}
.field-value{font-size:14px;line-height:20px;font-weight:600;overflow-wrap:anywhere}
.record-grid{gap:12px;margin-top:12px;padding-top:12px}
.record-footer{gap:8px;margin-top:12px;padding-top:12px;flex-wrap:wrap}
.record-actions{gap:8px;flex-wrap:wrap}
.ref-status,.compliance-status,.pill{min-height:24px;padding:4px 8px;font-size:11px;line-height:16px;font-weight:600}
.ref-alert{padding:16px;gap:12px;min-height:0;margin-bottom:8px}
.ref-alert-dot{width:10px;height:10px;flex:0 0 10px}
.ref-alert-main b{font-size:14px;line-height:20px;font-weight:600}
.ref-alert-main p{font-size:12px;line-height:18px;margin:4px 0 0}
.ref-map{max-width:100%;margin:16px 0;height:210px}
.ref-trip{padding:16px;margin-bottom:12px}
.ref-stops{gap:12px}
.ref-stop b{font-size:14px;line-height:20px;font-weight:600}
.ref-section-head+.ref-card{margin-top:0}
/* Search and filters */
.search-wrap,.ref-page .search-wrap{height:48px;min-height:48px;margin:0 0 12px;padding:0 12px;gap:8px;border-radius:12px}
.search-wrap svg,.ref-page .search-wrap svg{width:18px;height:18px}
.search-wrap input,.ref-page .search-wrap input{font-size:14px;line-height:20px;min-width:0}
.filter-row,.ref-page .filter-row{gap:8px;margin:0 0 12px;padding-bottom:2px}
.filter-chip,.ref-page .filter-chip{min-height:34px;padding:7px 12px;font-size:12px;line-height:16px;font-weight:600;flex:0 0 auto}
.compliance-filters{gap:8px;margin:12px 0}
.compliance-filters>select,.compliance-filters>label{min-height:40px;font-size:12px}
.sort-row,select{max-width:100%}
/* Forms and actions */
.primary-btn,.secondary-btn,.quiet-btn{min-height:48px;padding:0 16px;font-size:14px;line-height:20px;font-weight:600;gap:8px;border-radius:11px}
.secondary-btn{min-height:44px}
.primary-btn svg,.secondary-btn svg,.quiet-btn svg{width:18px;height:18px}
.small-action{min-height:36px;padding:8px 10px;font-size:12px;line-height:16px;font-weight:600}
.form-grid{gap:16px}
.form-field{min-width:0}
.form-field label{font-size:14px;line-height:20px;font-weight:600;margin-bottom:8px}
.form-field input,.form-field select,.form-field textarea{width:100%;min-height:48px;height:48px;padding:0 12px;font-size:14px;line-height:20px}
.form-field textarea{height:auto;min-height:120px;padding:12px}
.form-field input[type=date],.form-field input[type=time]{padding-right:10px}
.form-field .ff-select-host{height:48px}
.modal-backdrop{padding:12px}
.modal-sheet{padding:20px;max-height:90%;border-radius:20px}
.modal-title{font-size:18px;line-height:24px;font-weight:600}
.modal-head{margin-bottom:16px}
.modal-actions{gap:8px;margin-top:20px}
.modal-actions button{min-height:44px}
.empty-state{padding:32px 16px}
.empty-icon{width:48px;height:48px;margin:0 auto 16px}
.empty-title{font-size:18px;line-height:24px;font-weight:600}
.empty-copy{font-size:13px;line-height:18px;margin-top:8px}
.note-banner{padding:12px;font-size:12px;line-height:18px;margin:12px 0}
.toast{padding:12px 16px;font-size:13px;line-height:18px}
/* More menu and account/support rows */
.more-list{display:grid;gap:4px}
.more-item{min-height:56px;padding:12px;gap:12px}
.more-icon{width:36px;height:36px;flex:0 0 36px}
.more-icon svg{width:20px;height:20px}
.more-title{font-size:14px;line-height:20px;font-weight:500}
.more-desc{font-size:11px;line-height:16px}
.chevron{font-size:16px}
.mini-row{padding:12px 0;gap:12px}
.mini-icon{width:32px;height:32px;flex:0 0 32px}
.mini-icon svg{width:16px;height:16px}
.quick-grid{gap:8px}
.quick-action{min-height:72px;padding:12px 7px;font-size:12px}
.quick-action span{width:32px;height:32px;margin:0 auto 8px}
.quick-action svg{width:18px;height:18px}
/* Navigation and floating actions retain the current five-tab navigation and fixed CTA behaviour. */
.bottom-nav{grid-template-columns:repeat(5,minmax(0,1fr));flex:0 0 78px;height:78px;min-height:78px;padding:6px 8px}
.nav-item{min-width:0;min-height:58px;gap:4px;padding:4px 0;font-size:10px;line-height:14px;font-weight:500}
.nav-item svg{width:22px;height:22px}
#viewScroll{padding-bottom:112px!important}
#floatingActionRoot .primary-btn{min-height:48px;font-size:14px;font-weight:600}
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline-offset:2px}
@media(max-width:390px){
  #viewScroll,.view-scroll{padding-left:15px!important;padding-right:15px!important}
  .ref-card,.record-card,.panel{padding:16px}
  .ref-stats,.stats-grid,.compliance-stats{gap:12px}
  .ref-heading .page-title,.page-heading .page-title,.ref-page>.page-title{font-size:24px}
}
@media(max-width:350px){
  .ref-heading,.page-heading{gap:8px}
  .ref-heading-actions{gap:7px}
  .ref-heading-actions .ref-avatar{width:34px;height:34px;flex-basis:34px}
  .ref-heading .page-title,.page-heading .page-title{font-size:22px}
  .primary-btn,.secondary-btn{padding-left:12px;padding-right:12px}
  .record-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .record-footer{align-items:flex-start}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important}}
/* Client portfolio opens as a compact bottom-sheet modal from Home. */
/* Document Library card styles are centralised in document-card-contract.css. */.document-help{display:block;color:var(--muted);font-size:9px;margin-top:5px}.document-upload-progress{margin-top:12px}.document-upload-progress>div{height:6px;border-radius:8px;background:#e9e4df;overflow:hidden}.document-upload-progress i{display:block;width:0;height:100%;background:var(--color-primary);border-radius:8px;transition:width .12s linear}.document-upload-progress small{display:block;font-size:9px;color:var(--muted);margin-top:5px}.document-form-sheet{max-height:92%}.document-form-sheet form{padding-bottom:2px}.document-form-sheet input[type=file]{font-size:10px;padding:7px}
/* Make the Home Client portfolio action read as a real button, not a text link. */
/* Center the icon precisely inside the close control's grey frame. */
.modal-head .modal-close{width:30px!important;min-width:30px!important;height:30px!important;min-height:30px!important;padding:0!important;display:inline-grid!important;place-items:center!important;line-height:0!important;font-size:0!important;flex:0 0 30px!important}
.modal-head .modal-close svg{display:block!important;width:16px!important;height:16px!important;margin:0!important;flex:none!important;align-self:center!important;justify-self:center!important}
.ref-section-head [data-action="client-portfolio"]{min-height:36px;padding:0 14px;border:1px solid var(--color-border);border-radius:10px;background:var(--color-primary);color:#fff;font-size:12px;font-weight:700;display:inline-flex;align-items:center;justify-content:center}
.client-portfolio-modal .modal-head .modal-close{width:auto;min-width:58px;height:34px;padding:0 12px;border-radius:9px;font-size:12px;font-weight:650;line-height:1}
.client-portfolio-modal{max-height:78%!important}
.client-portfolio-stats{margin:0!important}
.client-portfolio-stats .ref-stat:last-child{grid-column:1/-1;min-height:82px!important}
/* Compact heading-to-content rhythm on operational screens. Keep the established More subpages unchanged. */
.app-root.compact-heading-spacing .ref-heading,.app-root.compact-heading-spacing .page-heading{min-height:0!important;margin-bottom:12px!important}