<?php /* Shared ultra-compact density layer — included by includes/header.php (internal
   app, every role) and the client portal pages. Login screens are standalone and
   don't include this. Uses !important to beat Bootstrap's !important spacing utilities. */ ?>
<style>
/* ============================================================
   ULTRA-COMPACT DENSITY  (every page, every role)
   ============================================================ */
:root { font-size: 11px; }                                   /* MASTER LEVER: scales the entire rem system (~69% of 16px) */
body { font-size: .9rem !important; line-height: 1.3 !important; }
.container-xl, .container-fluid, .container { max-width: 100% !important; }

/* ---- page chrome ---- */
.page-wrapper { min-height: 0 !important; }
.page-header  { padding-top: .35rem !important; padding-bottom: .35rem !important; margin-bottom: 0 !important; }
.page-body    { padding-top: .45rem !important; padding-bottom: .55rem !important; }
.page-title   { font-size: 1.1rem !important; line-height: 1.2 !important; margin: 0 !important; }
h1{font-size:1.25rem!important} h2{font-size:1.06rem!important} h3{font-size:.96rem!important}
h4{font-size:.88rem!important} h5{font-size:.82rem!important}

/* ---- the real height eaters: Bootstrap spacing utilities (they ship !important) ---- */
.mb-1{margin-bottom:.2rem!important} .mb-2{margin-bottom:.35rem!important} .mb-3{margin-bottom:.5rem!important}
.mb-4{margin-bottom:.7rem!important} .mb-5{margin-bottom:.9rem!important}
.mt-1{margin-top:.2rem!important} .mt-2{margin-top:.35rem!important} .mt-3{margin-top:.5rem!important}
.mt-4{margin-top:.7rem!important} .mt-5{margin-top:.9rem!important}
.my-2{margin-top:.35rem!important;margin-bottom:.35rem!important}
.my-3{margin-top:.5rem!important;margin-bottom:.5rem!important}
.p-3{padding:.6rem!important} .p-4{padding:.8rem!important}
.py-3{padding-top:.5rem!important;padding-bottom:.5rem!important} .py-4{padding-top:.7rem!important;padding-bottom:.7rem!important}
.py-5{padding-top:1rem!important;padding-bottom:1rem!important}
.pt-3{padding-top:.5rem!important} .pb-3{padding-bottom:.5rem!important}
.g-2{--tblr-gutter-x:.4rem!important;--tblr-gutter-y:.4rem!important}
.g-3{--tblr-gutter-x:.55rem!important;--tblr-gutter-y:.55rem!important}
.g-4{--tblr-gutter-x:.7rem!important;--tblr-gutter-y:.7rem!important}
.row { --tblr-gutter-x:.6rem; }
.row-cards, .row-deck { --tblr-gutter-y:.55rem!important; }

/* ---- cards ---- */
.card { margin-bottom: 0 !important; }
.card-header { padding: .4rem .65rem !important; min-height: 0 !important; }
.card-title  { font-size: .88rem !important; margin: 0 !important; }
.card-body   { padding: .5rem .65rem !important; }
.card-footer { padding: .4rem .65rem !important; }
.card-sm .card-body { padding: .4rem .55rem !important; }

/* ---- tables ---- */
.table > :not(caption) > * > *    { padding: .26rem .45rem !important; }
.table-sm > :not(caption) > * > * { padding: .14rem .35rem !important; }

/* ---- forms & buttons ---- */
.form-control, .form-select       { padding: .22rem .5rem !important; min-height: 0 !important; height: auto !important; font-size: .85rem !important; }
.form-control-sm, .form-select-sm { padding: .1rem .4rem !important; }
.form-label { margin-bottom: .15rem !important; }
.input-icon-addon { width: 2rem; }
.btn    { padding: .26rem .55rem !important; }
.btn-sm { padding: .12rem .4rem !important; }
.btn-lg { padding: .36rem .7rem !important; font-size: .9rem !important; }

/* ---- nav / misc ---- */
.navbar-vertical .nav-link { padding-top: .3rem !important; padding-bottom: .3rem !important; }
.nav-item.nav-header { padding-top: .35rem !important; padding-bottom: .05rem !important; }
.alert  { padding: .45rem .65rem !important; margin-bottom: .5rem !important; }
.datagrid { gap: .4rem .9rem !important; }
.avatar-sm { width: 1.6rem !important; height: 1.6rem !important; font-size: .66rem !important; }
.badge { font-size: .66rem; }

/* ---- common custom hero/banner blocks across pages ---- */
.welcome-hero, .ws-hero { padding: 10px 14px !important; margin: 6px 0 !important; border-radius: 9px !important; }
.welcome-hero .hi, .ws-hero .hi { font-size: 1.15rem !important; }
.rv-insights { padding: .35rem .55rem !important; }
.legacy-title { padding: .3rem .55rem !important; }

/* ---- structural chrome: fixed-px elements the rem scale can't reach ---- */
.navbar.m-topbar { min-height: 40px !important; }
.m-topbar .m-search { min-width: 0 !important; padding: 3px 9px !important; font-size: .8rem !important; }
.m-topbar .btn-icon, .navbar .btn-icon { width: 1.7rem !important; height: 1.7rem !important; padding: 0 !important; }
.navbar-vertical .navbar-brand { padding: .5rem .8rem .35rem !important; }
.navbar-vertical .navbar-brand a span:last-child { font-size: .95rem !important; }
.page-title { font-size: 1rem !important; }
.stat-value { font-size: 1.2rem !important; }
.stat-label { font-size: .6rem !important; }
.breadcrumb-bar { padding: .3rem 0 !important; }
.avatar-sm { width: 1.45rem !important; height: 1.45rem !important; }

/* ---- broaden utility coverage (vertical-space eaters not caught above) ---- */
.p-2{padding:.35rem!important} .p-5{padding:1rem!important}
.py-2{padding-top:.35rem!important;padding-bottom:.35rem!important}
.pt-2{padding-top:.35rem!important} .pb-2{padding-bottom:.35rem!important}
.pt-4{padding-top:.7rem!important} .pb-4{padding-bottom:.7rem!important}
.my-4{margin-top:.7rem!important;margin-bottom:.7rem!important} .my-5{margin-top:.9rem!important;margin-bottom:.9rem!important}
.mt-0,.mb-0{margin:0!important}
.gap-1{gap:.2rem!important} .gap-2{gap:.35rem!important} .gap-3{gap:.55rem!important} .gap-4{gap:.7rem!important}
.g-1{--tblr-gutter-x:.2rem!important;--tblr-gutter-y:.2rem!important}
.gy-3{--tblr-gutter-y:.55rem!important} .gy-4{--tblr-gutter-y:.7rem!important}
.fs-1{font-size:1.25rem!important} .fs-2{font-size:1.1rem!important} .fs-3{font-size:1rem!important} .fs-4{font-size:.92rem!important}
.lead{font-size:.95rem!important}
.display-1,.display-2,.display-3,.display-4,.display-5,.display-6{font-size:1.5rem!important;line-height:1.1!important}
.row-cards{--tblr-gutter-y:.5rem!important}
.nav-tabs .nav-link{padding:.3rem .6rem!important}
.page-header{margin-top:0!important}
</style>
