/* BIMAS professional UI refinement.
   This final layer keeps module-specific layouts intact while improving the
   shared shell, hierarchy, density, interaction feedback and accessibility. */

:root{
  --pro-ink:#0b172a;
  --pro-muted:#64748b;
  --pro-line:#dbe4ef;
  --pro-line-strong:#cbd8e6;
  --pro-surface:#ffffff;
  --pro-surface-soft:#f7f9fc;
  --pro-blue:#0b5cab;
  --pro-blue-deep:#073f78;
  --pro-orange:#e96716;
  --pro-radius:10px;
  --pro-shadow:0 1px 2px rgba(15,23,42,.04),0 8px 24px rgba(15,23,42,.055);
  --pro-shadow-raised:0 2px 4px rgba(15,23,42,.05),0 14px 34px rgba(15,23,42,.09);
  --pro-content-gap:clamp(1rem,1.8vw,1.75rem);
}

html[data-theme="dark"]{
  --pro-ink:#e8eef7;
  --pro-muted:#9fb0c5;
  --pro-line:#263850;
  --pro-line-strong:#334a66;
  --pro-surface:#101c2d;
  --pro-surface-soft:#0c1726;
  --pro-shadow:0 1px 2px rgba(0,0,0,.22),0 10px 28px rgba(0,0,0,.18);
  --pro-shadow-raised:0 2px 5px rgba(0,0,0,.28),0 16px 38px rgba(0,0,0,.24);
}

body{
  color:var(--pro-ink);
  background-color:var(--pro-surface-soft);
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}

html{scroll-padding-top:calc(var(--topbar-h,3.75rem) + 1rem)}

/* App shell */
#app-topbar{
  min-height:var(--topbar-h,4rem);
  padding-inline:clamp(.75rem,1.5vw,1.5rem)!important;
  border-bottom:1px solid color-mix(in srgb,var(--pro-blue) 10%,var(--pro-line))!important;
  background:color-mix(in srgb,var(--pro-surface) 94%,transparent)!important;
  box-shadow:0 1px 2px rgba(15,23,42,.035),0 6px 20px rgba(15,23,42,.045)!important;
  backdrop-filter:blur(18px) saturate(150%)!important;
}

#app-topbar::after{height:1px!important;opacity:.7}

#app-topbar .icon-btn{
  width:2.45rem!important;
  height:2.45rem!important;
  border:1px solid transparent!important;
  border-radius:9px!important;
  color:var(--text-secondary)!important;
  background:transparent!important;
  box-shadow:none!important;
}

#app-topbar .icon-btn:hover{
  color:var(--pro-blue)!important;
  border-color:color-mix(in srgb,var(--pro-blue) 15%,var(--pro-line))!important;
  background:color-mix(in srgb,var(--pro-blue) 7%,var(--pro-surface))!important;
  transform:translateY(-1px);
}

#app-topbar .topbar-search-trigger{
  height:2.45rem!important;
  min-width:clamp(10rem,18vw,17rem);
  justify-content:flex-start!important;
  border:1px solid var(--pro-line)!important;
  border-radius:9px!important;
  background:var(--pro-surface-soft)!important;
  color:var(--pro-muted)!important;
  box-shadow:inset 0 1px 1px rgba(15,23,42,.025)!important;
}

#app-topbar .topbar-search-trigger:hover{
  border-color:color-mix(in srgb,var(--pro-blue) 36%,var(--pro-line))!important;
  background:var(--pro-surface)!important;
  color:var(--pro-ink)!important;
}

#app-topbar .company-pill,
#app-topbar .topbar-user-btn{
  min-height:2.45rem!important;
  border:1px solid var(--pro-line)!important;
  border-radius:9px!important;
  background:var(--pro-surface)!important;
  box-shadow:0 1px 2px rgba(15,23,42,.035)!important;
}

#app-sidebar.sidebar-modern{
  border-right:1px solid rgba(255,255,255,.07)!important;
  box-shadow:10px 0 30px rgba(2,12,27,.1)!important;
}

#app-sidebar .sidebar-search{
  margin:.65rem .7rem .55rem!important;
  border:1px solid rgba(255,255,255,.1)!important;
  border-radius:9px!important;
  background:rgba(255,255,255,.055)!important;
}

#app-sidebar .sidebar-search:focus-within{
  border-color:rgba(96,165,250,.52)!important;
  background:rgba(255,255,255,.085)!important;
  box-shadow:0 0 0 3px rgba(59,130,246,.12)!important;
}

#app-sidebar .nav-group-header{
  min-height:2.35rem;
  margin-top:.25rem;
  border-radius:8px!important;
  letter-spacing:.025em!important;
}

#app-sidebar .nav-item{
  min-height:2.5rem!important;
  border-radius:8px!important;
}

#app-sidebar .nav-item.active,
#app-sidebar .nav-item[aria-current="page"]{
  box-shadow:inset 3px 0 0 #67b7ff,0 5px 14px rgba(1,11,25,.16)!important;
}

#app-sidebar .nav-group-count{
  min-width:1.35rem;
  height:1.2rem;
  display:inline-grid;
  place-items:center;
  padding:0 .3rem;
  border:1px solid rgba(255,255,255,.08);
  border-radius:999px;
  background:rgba(255,255,255,.06);
  font-variant-numeric:tabular-nums;
}

/* Page hierarchy */
#app-content{
  padding:
    calc(var(--topbar-h,3.75rem) + var(--pro-content-gap))
    var(--pro-content-gap)
    clamp(2.5rem,4vw,4rem)!important;
  background:
    radial-gradient(circle at 100% 0,color-mix(in srgb,var(--pro-blue) 4%,transparent),transparent 28rem),
    var(--pro-surface-soft)!important;
}

#app-content > :is(.page-container,[class*="-shell"],[class*="-module"]){
  width:min(100%,100rem)!important;
  margin-inline:auto!important;
}

#app-content :is([id],.page-header,[class$="-page-header"]){
  scroll-margin-top:calc(var(--topbar-h,3.75rem) + 1rem);
}

#app-content :is(.page-header,[class$="-page-header"]){
  gap:.8rem!important;
  margin-bottom:clamp(1rem,1.7vw,1.5rem)!important;
  padding-bottom:clamp(.8rem,1.25vw,1.1rem)!important;
  border-bottom:1px solid var(--pro-line)!important;
}

#app-content .page-header:not(.settings-hero){
  padding:.95rem 1rem .95rem 1.15rem!important;
  border:1px solid var(--pro-line)!important;
  border-radius:var(--pro-radius)!important;
  background:
    linear-gradient(100deg,color-mix(in srgb,var(--pro-blue) 4%,var(--pro-surface)),var(--pro-surface) 48%,color-mix(in srgb,var(--pro-orange) 2.5%,var(--pro-surface)))!important;
  box-shadow:0 1px 2px rgba(15,23,42,.035)!important;
}

#app-content .page-header:not(.settings-hero)::before{
  top:.85rem!important;
  bottom:.85rem!important;
  left:.65rem!important;
}

#app-content .page-header:not(.settings-hero) > :first-child{margin-left:.4rem!important}

#app-content .page-header :is(.btn,.icon-btn){flex-shrink:0}

#app-content :is(.page-header,[class$="-page-header"])::before{
  width:3px!important;
  top:.1rem!important;
  bottom:calc(clamp(.8rem,1.25vw,1.1rem) + .1rem)!important;
  background:linear-gradient(180deg,var(--pro-blue),var(--pro-orange))!important;
}

#app-content :is(.page-header,[class$="-page-header"]) h1,
#app-content .page-title{
  color:var(--pro-ink)!important;
  font-size:clamp(1.4rem,2vw,1.85rem)!important;
  font-weight:850!important;
  line-height:1.15!important;
  letter-spacing:-.035em!important;
}

#app-content :is(.page-header,[class$="-page-header"]) p{
  max-width:52rem;
  margin-top:.28rem!important;
  color:var(--pro-muted)!important;
  font-size:.84rem!important;
  line-height:1.5!important;
}

.bimas-route-context{
  margin-bottom:.42rem!important;
  color:var(--pro-blue)!important;
  font-size:.62rem!important;
  letter-spacing:.065em!important;
  opacity:.88!important;
}

/* Surfaces and content grouping */
#app-content .card,
#app-content .module-card,
#app-content .dash-card{
  border:1px solid var(--pro-line)!important;
  border-radius:var(--pro-radius)!important;
  background:var(--pro-surface)!important;
  box-shadow:var(--pro-shadow)!important;
}

#app-content :is(.card,.module-card,.dash-card):hover{
  border-color:var(--pro-line-strong)!important;
  box-shadow:var(--pro-shadow-raised)!important;
  transform:translateY(-1px)!important;
}

#app-content :is(.card,.module-card,.dash-card) :is(h2,h3,h4){
  color:var(--pro-ink);
  letter-spacing:-.018em;
}

#app-content hr{border-color:var(--pro-line)!important}

/* Controls */
#app-content .btn,
.modal-content .btn{
  min-height:2.35rem;
  padding:.53rem .9rem;
  border-radius:8px!important;
  font-weight:750!important;
  letter-spacing:0!important;
  box-shadow:none!important;
}

#app-content .btn-sm,
.modal-content .btn-sm{
  min-height:2rem;
  padding:.38rem .7rem;
  border-radius:7px!important;
}

#app-content .btn-primary,
.modal-content .btn-primary{
  border:1px solid color-mix(in srgb,var(--pro-blue-deep) 50%,transparent)!important;
  background:linear-gradient(180deg,color-mix(in srgb,var(--pro-blue) 88%,#fff),var(--pro-blue))!important;
  box-shadow:0 1px 2px rgba(7,63,120,.18)!important;
}

#app-content .btn-primary:hover,
.modal-content .btn-primary:hover{
  background:linear-gradient(180deg,var(--pro-blue),var(--pro-blue-deep))!important;
  box-shadow:0 6px 16px rgba(11,92,171,.2)!important;
  transform:translateY(-1px)!important;
}

#app-content :is(.btn-secondary,.btn-ghost),
.modal-content :is(.btn-secondary,.btn-ghost){
  border:1px solid var(--pro-line)!important;
  background:var(--pro-surface)!important;
  color:var(--pro-ink)!important;
}

#app-content :is(.btn-secondary,.btn-ghost):hover,
.modal-content :is(.btn-secondary,.btn-ghost):hover{
  border-color:color-mix(in srgb,var(--pro-blue) 25%,var(--pro-line))!important;
  background:color-mix(in srgb,var(--pro-blue) 5%,var(--pro-surface))!important;
  color:var(--pro-blue)!important;
}

#app-content :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea),
.modal-content :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea){
  min-height:2.55rem;
  border:1px solid var(--pro-line-strong)!important;
  border-radius:8px!important;
  background:var(--pro-surface)!important;
  color:var(--pro-ink)!important;
  box-shadow:inset 0 1px 2px rgba(15,23,42,.025)!important;
}

#app-content textarea,
.modal-content textarea{min-height:5.5rem;resize:vertical}

#app-content :is(input,select,textarea):hover,
.modal-content :is(input,select,textarea):hover{
  border-color:color-mix(in srgb,var(--pro-blue) 28%,var(--pro-line-strong))!important;
}

#app-content :is(input,select,textarea):focus,
.modal-content :is(input,select,textarea):focus{
  border-color:var(--pro-blue)!important;
  box-shadow:0 0 0 3px color-mix(in srgb,var(--pro-blue) 12%,transparent)!important;
}

#app-content .form-label,
.modal-content .form-label{
  margin-bottom:.38rem!important;
  color:color-mix(in srgb,var(--pro-ink) 84%,var(--pro-muted))!important;
  font-size:.74rem!important;
  font-weight:750!important;
  letter-spacing:.01em!important;
}

/* Dense operational tables */
#app-content :is(.data-table-wrap,.table-responsive,[class$="-table-wrap"]){
  border:1px solid var(--pro-line)!important;
  border-radius:var(--pro-radius)!important;
  background:var(--pro-surface)!important;
  box-shadow:var(--pro-shadow)!important;
  scrollbar-width:thin;
  scrollbar-color:var(--pro-line-strong) transparent;
}

#app-content :is(.data-table,.data-table-premium){
  border-collapse:separate!important;
  border-spacing:0!important;
  font-variant-numeric:tabular-nums;
}

#app-content :is(.data-table,.data-table-premium) thead tr{
  background:color-mix(in srgb,var(--pro-blue) 5%,var(--pro-surface))!important;
}

#app-content :is(.data-table,.data-table-premium) th{
  padding:.68rem .85rem!important;
  border-bottom:1px solid var(--pro-line-strong)!important;
  background:color-mix(in srgb,var(--pro-blue) 5%,var(--pro-surface))!important;
  color:color-mix(in srgb,var(--pro-ink) 72%,var(--pro-muted))!important;
  font-size:.65rem!important;
  font-weight:850!important;
  line-height:1.25!important;
  letter-spacing:.055em!important;
}

#app-content :is(.data-table,.data-table-premium) td{
  padding:.72rem .85rem!important;
  border-bottom:1px solid color-mix(in srgb,var(--pro-line) 82%,transparent)!important;
  color:var(--pro-ink)!important;
  font-size:.81rem!important;
  line-height:1.4!important;
}

#app-content :is(.data-table,.data-table-premium) tbody tr,
#app-content :is(.data-table,.data-table-premium) tbody tr:nth-child(even){
  background:var(--pro-surface)!important;
  transform:none!important;
}

#app-content :is(.data-table,.data-table-premium) tbody tr:hover{
  background:color-mix(in srgb,var(--pro-blue) 4.5%,var(--pro-surface))!important;
  box-shadow:inset 3px 0 0 var(--pro-blue)!important;
}

#app-content :is(.data-table,.data-table-premium) tbody tr:last-child td{border-bottom:0!important}

/* Status, tabs and feedback */
#app-content .badge,
.modal-content .badge{
  min-height:1.55rem;
  padding:.24rem .58rem!important;
  border:1px solid currentColor!important;
  border-radius:999px!important;
  font-size:.62rem!important;
  font-weight:800!important;
  letter-spacing:.035em!important;
  box-shadow:none!important;
}

#app-content :is(.tabs,.tab-list,[role="tablist"]){
  gap:.25rem!important;
  padding:.25rem!important;
  border:1px solid var(--pro-line)!important;
  border-radius:9px!important;
  background:color-mix(in srgb,var(--pro-line) 30%,var(--pro-surface))!important;
}

#app-content :is(.tab-btn,.tab-button,[role="tab"]){
  min-height:2.2rem;
  border-radius:7px!important;
  font-weight:750!important;
}

#app-content :is(.tab-btn,.tab-button,[role="tab"]):is(.active,[aria-selected="true"]){
  background:var(--pro-surface)!important;
  color:var(--pro-blue)!important;
  box-shadow:0 1px 4px rgba(15,23,42,.1)!important;
}

.modal-overlay{
  padding:clamp(.75rem,3vw,2rem)!important;
  background:rgba(4,15,31,.68)!important;
  backdrop-filter:blur(8px) saturate(120%)!important;
}

.modal-content{
  max-height:min(90vh,58rem)!important;
  overflow:auto!important;
  border:1px solid color-mix(in srgb,var(--pro-blue) 12%,var(--pro-line))!important;
  border-radius:12px!important;
  background:var(--pro-surface)!important;
  box-shadow:0 24px 70px rgba(2,12,27,.28)!important;
}

.modal-content::before{
  height:3px!important;
  background:linear-gradient(90deg,var(--pro-blue),#1b8bbf 64%,var(--pro-orange))!important;
}

.modal-header{
  margin-bottom:1.1rem!important;
  padding-bottom:.9rem!important;
  border-color:var(--pro-line)!important;
}

.modal-footer{
  position:sticky;
  bottom:0;
  z-index:2;
  margin:1rem -2rem -2rem!important;
  padding:.9rem 2rem!important;
  border-top:1px solid var(--pro-line)!important;
  background:color-mix(in srgb,var(--pro-surface) 94%,transparent)!important;
  backdrop-filter:blur(12px);
}

/* Motion is purposeful and restrained. */
@media (prefers-reduced-motion:no-preference){
  #app-content :is(.card,.module-card,.dash-card,.btn),
  #app-topbar :is(.icon-btn,.topbar-search-trigger){
    transition:color .16s ease,background-color .16s ease,border-color .16s ease,box-shadow .18s ease,transform .18s ease!important;
  }
}

@media (max-width:960px){
  #app-topbar .topbar-search-trigger{min-width:2.45rem;width:2.45rem;padding:0!important;justify-content:center!important}
  #app-topbar .topbar-search-trigger > span:last-child{display:none}
  #app-content{
    padding:
      calc(var(--topbar-h,3.75rem) + 1rem)
      1rem
      calc(5.25rem + env(safe-area-inset-bottom,0px))!important;
  }
}

@media (max-width:767px){
  #app-topbar{padding-inline:.65rem!important}
  #app-content{
    padding:
      calc(var(--topbar-h,3.6rem) + .75rem)
      .75rem
      calc(5.25rem + env(safe-area-inset-bottom,0px))!important;
  }

  #app-content :is(.page-header,[class$="-page-header"]){
    align-items:flex-start!important;
    margin-bottom:.85rem!important;
    padding-bottom:.75rem!important;
  }

  #app-content .page-header:not(.settings-hero){
    padding:.82rem .78rem .82rem .95rem!important;
  }

  #app-content .page-header:not(.settings-hero)::before{
    top:.72rem!important;
    bottom:.72rem!important;
    left:.48rem!important;
  }

  #app-content :is(.page-header,[class$="-page-header"]) h1,
  #app-content .page-title{font-size:1.3rem!important}

  #app-content :is(.page-header,[class$="-page-header"]) p{font-size:.78rem!important}

  #app-content :is(.page-header,[class$="-page-header"]) .btn{
    min-height:2.35rem!important;
  }

  #app-content :is(.data-table,.data-table-premium) th{padding:.6rem .7rem!important}
  #app-content :is(.data-table,.data-table-premium) td{padding:.65rem .7rem!important}

  .modal-overlay{align-items:flex-end!important;padding:0!important}
  .modal-content{
    width:100%!important;
    max-width:none!important;
    max-height:92dvh!important;
    margin:0!important;
    padding:1.15rem!important;
    border-radius:14px 14px 0 0!important;
  }
  .modal-footer{margin:1rem -1.15rem -1.15rem!important;padding:.8rem 1.15rem calc(.8rem + env(safe-area-inset-bottom))!important}
}

@media (max-width:420px){
  #app-topbar .company-switcher{display:none!important}
  #app-content :is(.page-header,[class$="-page-header"]){display:block!important}
  #app-content :is(.page-header,[class$="-page-header"]) > :last-child:not(:first-child){margin-top:.7rem!important}
}

@media (prefers-reduced-motion:reduce){
  #app-content *,#app-topbar *,#app-sidebar *{
    scroll-behavior:auto!important;
    animation-duration:.01ms!important;
    animation-iteration-count:1!important;
    transition-duration:.01ms!important;
  }
}

/* High-visibility experience surfaces: sign-in, search, menus and feedback. */
@media not all{
#login-screen{
  background:
    radial-gradient(circle at 12% 12%,rgba(45,159,210,.18),transparent 24rem),
    radial-gradient(circle at 90% 88%,rgba(233,103,22,.13),transparent 22rem),
    linear-gradient(145deg,#04172f 0%,#082c55 55%,#063e45 100%)!important;
}

#login-screen::before{opacity:.38!important;background-size:36px 36px!important}

#login-screen .login-frame{
  border:1px solid rgba(255,255,255,.2)!important;
  border-radius:18px!important;
  background:rgba(255,255,255,.97)!important;
  box-shadow:0 34px 90px rgba(0,8,22,.4),0 0 0 1px rgba(255,255,255,.08)!important;
}

#login-screen .login-visual{
  align-items:flex-start!important;
  text-align:left!important;
  background:
    linear-gradient(180deg,rgba(3,24,51,.12),rgba(3,24,51,.42)),
    linear-gradient(145deg,#0a4b8d 0%,#073c76 50%,#075c57 100%)!important;
}

#login-screen .login-visual::before{opacity:.55!important;background-size:42px 42px!important}

#login-screen .login-visual-kicker{
  position:relative;
  z-index:2;
  display:inline-flex;
  align-items:center;
  gap:.4rem;
  margin-bottom:auto;
  padding:.38rem .62rem;
  border:1px solid rgba(255,255,255,.2);
  border-radius:999px;
  background:rgba(255,255,255,.08);
  color:rgba(255,255,255,.84);
  font-size:.64rem;
  font-weight:850;
  letter-spacing:.065em;
  text-transform:uppercase;
  backdrop-filter:blur(8px);
}

#login-screen .login-visual-kicker .material-symbols-outlined{font-size:.9rem;color:#78e3bc}

#login-screen .login-visual-logo{
  align-self:center;
  padding:.8rem!important;
  border:1px solid rgba(255,255,255,.24);
  border-radius:14px;
  background:rgba(255,255,255,.95);
  box-shadow:0 18px 45px rgba(0,8,22,.24)!important;
}

#login-screen .login-visual h1,
#login-screen .login-visual > p,
#login-screen .login-mark{align-self:center;text-align:center}

#login-screen .login-benefits{
  width:100%;
  border:1px solid rgba(255,255,255,.16)!important;
  border-radius:12px!important;
  background:rgba(2,18,39,.2)!important;
  backdrop-filter:blur(10px);
}

#login-screen .login-benefits div{padding-inline:.75rem!important}
#login-screen .login-benefits strong{font-size:.78rem!important;letter-spacing:.01em}
#login-screen .login-benefits small{color:rgba(255,255,255,.66)!important;font-size:.63rem!important}

#login-screen .login-card{
  border-left:1px solid rgba(148,163,184,.2)!important;
  background:linear-gradient(180deg,#fff 0%,#fbfdff 100%)!important;
}

#login-screen .login-card-icon{
  border:1px solid #cfe0f2!important;
  border-radius:12px!important;
  background:#edf6ff!important;
  color:var(--pro-blue)!important;
  box-shadow:none!important;
}

#login-screen .login-title{color:#0b172a!important;letter-spacing:-.035em!important}
#login-screen .login-sub{color:#64748b!important}

#login-screen .login-security-note{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:.35rem;
  margin:.55rem 0 .8rem;
  color:#52708f;
  font-size:.68rem;
  font-weight:700;
}

#login-screen .login-security-note .material-symbols-outlined{font-size:.86rem;color:#15803d}
#login-screen .login-mark-small{display:none!important}

#login-screen .login-field{
  border:1px solid #cbd8e6!important;
  border-radius:9px!important;
  background:#fff!important;
  box-shadow:inset 0 1px 2px rgba(15,23,42,.025)!important;
  transition:border-color .16s ease,box-shadow .16s ease!important;
}

#login-screen .login-field:focus-within{
  border-color:var(--pro-blue)!important;
  box-shadow:0 0 0 3px rgba(11,92,171,.11)!important;
}

#login-screen .login-input{
  border:0!important;
  border-radius:9px!important;
  background:transparent!important;
  box-shadow:none!important;
}

#login-screen .login-input::placeholder{color:#94a3b8}

#login-screen .login-eye{
  width:2.35rem!important;
  height:2.35rem!important;
  display:grid!important;
  place-items:center!important;
  right:.35rem!important;
  border:0!important;
  border-radius:8px!important;
  background:transparent!important;
  color:#64748b!important;
}

#login-screen .login-eye:hover{background:#eef4fa!important;color:var(--pro-blue)!important}

#login-screen .login-company-btn{
  border:1px solid #d5e0eb!important;
  border-radius:10px!important;
  background:#f8fafc!important;
  color:#334155!important;
  box-shadow:none!important;
}

#login-screen .login-company-btn:hover{
  border-color:#9cc0e4!important;
  background:#f0f7ff!important;
  transform:translateY(-1px);
}

#login-screen .login-company-btn.active{
  border-color:var(--pro-blue)!important;
  background:#eaf4ff!important;
  color:var(--pro-blue)!important;
  box-shadow:0 0 0 2px rgba(11,92,171,.09)!important;
}

#login-screen .login-btn{
  border:1px solid #073f78!important;
  border-radius:9px!important;
  background:linear-gradient(180deg,#1268bb,var(--pro-blue-deep))!important;
  box-shadow:0 8px 18px rgba(7,63,120,.2)!important;
}

#login-screen .login-btn:hover{
  filter:none!important;
  transform:translateY(-1px)!important;
  box-shadow:0 12px 24px rgba(7,63,120,.27)!important;
}
}

/* Command search */
#global-search-overlay{
  padding:clamp(3.75rem,8vh,6.5rem) 1rem 1rem!important;
  background:rgba(3,14,30,.68)!important;
  backdrop-filter:blur(10px) saturate(120%)!important;
}

#global-search-overlay .search-box{
  max-width:44rem!important;
  border:1px solid color-mix(in srgb,var(--pro-blue) 16%,var(--pro-line))!important;
  border-radius:14px!important;
  background:var(--pro-surface)!important;
  box-shadow:0 30px 85px rgba(0,8,22,.34)!important;
}

.search-dialog-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  padding:1rem 1.15rem .78rem;
  border-bottom:1px solid var(--pro-line);
}

.search-dialog-head > div{min-width:0;display:grid;gap:.12rem}
.search-dialog-kicker{color:var(--pro-blue);font-size:.58rem;font-weight:900;letter-spacing:.1em}
.search-dialog-head strong{color:var(--pro-ink);font-size:.88rem;font-weight:800;letter-spacing:-.01em}

.search-close-btn{
  width:2rem;
  height:2rem;
  display:grid;
  place-items:center;
  flex:0 0 auto;
  border:1px solid var(--pro-line);
  border-radius:8px;
  background:var(--pro-surface-soft);
  color:var(--pro-muted);
  cursor:pointer;
}

.search-close-btn:hover{border-color:var(--pro-line-strong);color:var(--pro-ink);background:var(--pro-surface)}
.search-close-btn .material-symbols-outlined{font-size:1rem}

#global-search-overlay .search-input-wrap{
  gap:.7rem!important;
  padding:.9rem 1.15rem!important;
  border-bottom:1px solid var(--pro-line)!important;
  background:color-mix(in srgb,var(--pro-blue) 3%,var(--pro-surface))!important;
}

#global-search-overlay .search-input-wrap > .material-symbols-outlined{color:var(--pro-blue)!important}

#global-search-overlay #gsearch-input{
  min-height:2.2rem!important;
  border:0!important;
  background:transparent!important;
  color:var(--pro-ink)!important;
  font-size:1rem!important;
  box-shadow:none!important;
}

.search-key-hint,
.search-dialog-foot kbd{
  padding:.2rem .42rem;
  border:1px solid var(--pro-line-strong);
  border-bottom-width:2px;
  border-radius:5px;
  background:var(--pro-surface);
  color:var(--pro-muted);
  font-family:var(--font-mono,monospace);
  font-size:.59rem;
  font-weight:800;
  line-height:1.2;
}

#global-search-overlay .search-results{max-height:min(26rem,52vh)!important;padding:.35rem!important}

#global-search-overlay .search-result-item{
  min-height:3.6rem;
  padding:.72rem .85rem!important;
  border:1px solid transparent;
  border-radius:9px;
}

#global-search-overlay .search-result-item:hover,
#global-search-overlay .search-result-item:focus-visible{
  border-color:color-mix(in srgb,var(--pro-blue) 15%,var(--pro-line))!important;
  background:color-mix(in srgb,var(--pro-blue) 5%,var(--pro-surface))!important;
}

.search-dialog-foot{
  display:flex;
  align-items:center;
  gap:1.25rem;
  padding:.65rem 1.15rem;
  border-top:1px solid var(--pro-line);
  background:var(--pro-surface-soft);
}

.search-dialog-foot span{
  display:inline-flex;
  align-items:center;
  gap:.35rem;
  color:var(--pro-muted);
  font-size:.64rem;
  font-weight:650;
}

/* Menus, toast feedback and empty states */
#app-topbar :is(.company-switcher-menu,.topbar-user-menu){
  border:1px solid var(--pro-line)!important;
  border-radius:12px!important;
  background:var(--pro-surface)!important;
  box-shadow:0 20px 55px rgba(2,12,27,.2)!important;
}

#app-topbar .company-switcher-option,
#app-topbar .company-switcher-logo{border-radius:9px!important}

.toast-container{gap:.55rem!important}
.toast{
  min-width:min(21rem,calc(100vw - 1.5rem))!important;
  padding:.85rem 1rem!important;
  border:1px solid rgba(255,255,255,.12)!important;
  border-left-width:4px!important;
  border-radius:10px!important;
  background:#0b172a!important;
  box-shadow:0 16px 38px rgba(2,12,27,.25)!important;
  line-height:1.45!important;
}

html[data-auth-ready="app"] #app-content .empty-state,
html[data-auth-ready="app"] #app-content .bimas-empty-state{
  min-height:14rem!important;
  padding:2.4rem 1.25rem!important;
  border:1px dashed color-mix(in srgb,var(--pro-blue) 20%,var(--pro-line))!important;
  border-radius:12px!important;
  background:linear-gradient(180deg,var(--pro-surface),color-mix(in srgb,var(--pro-blue) 2.5%,var(--pro-surface)))!important;
}

html[data-auth-ready="app"] #app-content .empty-state > .material-symbols-outlined,
html[data-auth-ready="app"] #app-content .bimas-empty-state > .material-symbols-outlined{
  width:3.25rem!important;
  height:3.25rem!important;
  display:grid!important;
  place-items:center!important;
  margin:0 0 .8rem!important;
  border:1px solid color-mix(in srgb,var(--pro-blue) 12%,var(--pro-line))!important;
  border-radius:11px!important;
  background:color-mix(in srgb,var(--pro-blue) 7%,var(--pro-surface))!important;
  color:var(--pro-blue)!important;
  font-size:1.55rem!important;
  opacity:1!important;
}

html[data-auth-ready="app"] #app-content .empty-state h3{
  color:var(--pro-ink)!important;
  font-size:1rem!important;
  font-weight:800!important;
}

#app-bottomnav{
  border-top:1px solid var(--pro-line)!important;
  background:color-mix(in srgb,var(--pro-surface) 95%,transparent)!important;
  box-shadow:0 -8px 24px rgba(15,23,42,.07)!important;
  backdrop-filter:blur(16px) saturate(140%)!important;
}

#app-bottomnav .bottomnav-item{border-radius:9px!important}
#app-bottomnav .bottomnav-item.active{
  background:color-mix(in srgb,var(--pro-blue) 8%,var(--pro-surface))!important;
  color:var(--pro-blue)!important;
}

@media (max-width:680px){
  #login-screen .login-security-note{margin:.35rem 0 .65rem;font-size:.64rem}
  #global-search-overlay{align-items:flex-end!important;padding:0!important}
  #global-search-overlay .search-box{max-width:none!important;border-radius:14px 14px 0 0!important}
  .search-dialog-head{padding:.85rem .9rem .7rem}
  #global-search-overlay .search-input-wrap{padding:.75rem .9rem!important}
  #global-search-overlay .search-results{max-height:55dvh!important}
  .search-dialog-foot{gap:.75rem;padding:.62rem .9rem calc(.62rem + env(safe-area-inset-bottom))}
  .search-dialog-foot span:first-child{display:none}
}

/* ================================================================
   BIMAS unified responsive workspace system
   Full-width modules, consistent typography, spacing and KPI language.
   ================================================================ */
@media not all{
:root{
  --bimas-brand-blue:#0b5cab;
  --bimas-brand-blue-deep:#073f78;
  --bimas-brand-orange:#e96716;
  --bimas-brand-teal:#0f766e;
  --bimas-brand-navy:#1e3a5f;
  --bimas-space-1:.375rem;
  --bimas-space-2:.625rem;
  --bimas-space-3:.875rem;
  --bimas-space-4:1.125rem;
  --bimas-space-5:1.5rem;
  --bimas-module-gap:clamp(.85rem,1.35vw,1.25rem);
  --bimas-kpi-min:13.25rem;
  --bimas-kpi-height:104px;
  --bimas-kpi-icon-size:2.65rem;
  --bimas-kpi-gap:var(--bimas-module-gap);
}

/* Every operational module uses all available workspace width. */
html[data-auth-ready="app"] #app-content,
html[data-auth-ready="app"] #app-content > *,
html[data-auth-ready="app"] #app-content > .page-container,
html[data-auth-ready="app"] #app-content > [class*="-shell"],
html[data-auth-ready="app"] #app-content > [class*="-module"],
html[data-auth-ready="app"] #app-content :is(
  .page-container,
  .dashboard-container,
  .dashboard-shell,
  .module-container,
  .module-shell,
  .ceo-shell,
  .settings-module
){
  box-sizing:border-box!important;
  width:100%!important;
  max-width:none!important;
}

html[data-auth-ready="app"] #app-content > *,
html[data-auth-ready="app"] #app-content > .page-container,
html[data-auth-ready="app"] #app-content > [class*="-shell"],
html[data-auth-ready="app"] #app-content > [class*="-module"]{
  margin-inline:0!important;
}

/* One readable type scale throughout the workspace. */
html[data-auth-ready="app"] #app-content{
  font-size:.875rem;
  line-height:1.5;
}

html[data-auth-ready="app"] #app-content :is(h1,h2,h3,h4,p){text-wrap:pretty}

html[data-auth-ready="app"] #app-content h1,
html[data-auth-ready="app"] #app-content .page-title{
  font-size:clamp(1.5rem,1.65vw,2rem)!important;
  font-weight:850!important;
  line-height:1.15!important;
  letter-spacing:-.035em!important;
}

html[data-auth-ready="app"] #app-content h2{
  font-size:clamp(1.08rem,1.15vw,1.3rem)!important;
  font-weight:800!important;
  line-height:1.25!important;
  letter-spacing:-.022em!important;
}

html[data-auth-ready="app"] #app-content h3{
  font-size:clamp(.92rem,1vw,1.08rem)!important;
  font-weight:780!important;
  line-height:1.3!important;
  letter-spacing:-.012em!important;
}

html[data-auth-ready="app"] #app-content :is(p,.text-muted,.helper-text,.hint-text){line-height:1.5!important}

html[data-auth-ready="app"] #app-content :is(.section-title,.card-title,[class$="-section-title"]){
  margin-bottom:var(--bimas-space-3)!important;
  color:var(--pro-ink)!important;
}

/* Shared dashboard and panel rhythm. */
html[data-auth-ready="app"] #app-content :is(
  .dashboard-grid,
  .dash-grid,
  [class*="dashboard-grid"],
  [class*="-panel-grid"],
  [class*="-content-grid"],
  [class*="-card-grid"]
){
  gap:var(--bimas-module-gap)!important;
}

html[data-auth-ready="app"] #app-content :is(.card,.module-card,.dash-card){
  padding:clamp(.9rem,1.2vw,1.2rem)!important;
}

/* A single responsive KPI system replaces route-specific compressed rows. */
html[data-auth-ready="app"] body[data-route] #app-content#app-content :is(
  .bimas-kpi-grid,
  .bimas-auto-kpi-strip,
  .dash-grid,
  .dash-kpi-grid,
  .ceo-kpi-grid,
  .ceo-report-grid,
  .pfi-kpi-grid,
  .reports-hub-kpis,
  .reports-report-kpis,
  .sales-perf-kpis,
  .accounts-kpi-grid,
  .fgs-kpi-grid,
  .inv-kpi-grid,
  .inv-overview-kpis,
  .wip-kpi-grid,
  .sof-kpi-grid,
  .fleet-kpi-grid,
  .drn-kpi-grid,
  .dn-kpi-grid,
  .voucher-kpi-grid,
  .notifications-kpi-grid,
  .prod-dash-kpis,
  [class*="-kpi-grid"],
  [class*="-metric-grid"],
  [class*="-stats-grid"],
  [class*="-kpis"]
){
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(min(100%,var(--bimas-kpi-min)),1fr))!important;
  gap:var(--bimas-kpi-gap)!important;
  align-items:stretch!important;
  width:100%!important;
  margin:0 0 var(--bimas-module-gap)!important;
}

html[data-auth-ready="app"] body[data-route] #app-content#app-content :is(
  .bimas-kpi,
  .bimas-auto-kpi-card,
  .kpi-card,
  .stats-card,
  .stat-card,
  .dash-kpi,
  .ceo-kpi,
  .ceo-report,
  .pfi-metric-card,
  .reports-hub-kpi,
  .reports-report-kpi,
  .sales-perf-kpi,
  .accounts-kpi-card,
  .fgs-metric-card,
  .inv-kpi-card,
  .inv-overview-metric-card,
  .wip-metric-card,
  .sof-kpi-card,
  .fleet-kpi-card,
  .drn-kpi-card,
  .dn-kpi-card,
  .voucher-kpi-card,
  .notifications-kpi-card,
  .prod-dash-kpi,
  .settings-summary-card,
  .settings-readiness-card,
  .settings-mobile-stat,
  [class*="-kpi-card"],
  [class*="-metric-card"],
  [class*="-stat-card"]
){
  box-sizing:border-box!important;
  min-width:0!important;
  min-height:var(--bimas-kpi-height)!important;
  height:auto!important;
  grid-template-columns:var(--bimas-kpi-icon-size) minmax(0,1fr)!important;
  grid-template-rows:auto auto auto!important;
  column-gap:.8rem!important;
  row-gap:.15rem!important;
  align-content:center!important;
  padding:.85rem .95rem!important;
  border:1px solid var(--pro-line)!important;
  border-left:4px solid var(--bimas-final-tone,var(--bimas-brand-blue))!important;
  border-radius:var(--pro-radius)!important;
  background:linear-gradient(180deg,var(--pro-surface),color-mix(in srgb,var(--bimas-final-tone,var(--bimas-brand-blue)) 2.5%,var(--pro-surface)))!important;
  box-shadow:var(--pro-shadow)!important;
  overflow:hidden!important;
}

/* BIMAS brand sequence; status colours remain reserved for alerts and badges. */
html[data-auth-ready="app"] body[data-route] #app-content#app-content :is(
  .bimas-kpi-grid,.bimas-auto-kpi-strip,.dash-kpi-grid,.ceo-kpi-grid,.ceo-report-grid,
  .pfi-kpi-grid,.reports-hub-kpis,.accounts-kpi-grid,.fgs-kpi-grid,.inv-kpi-grid,
  .inv-overview-kpis,.wip-kpi-grid,.sof-kpi-grid,.fleet-kpi-grid,.drn-kpi-grid,
  .dn-kpi-grid,.voucher-kpi-grid,.notifications-kpi-grid,.prod-dash-kpis,
  [class*="-kpi-grid"],[class*="-metric-grid"],[class*="-stats-grid"],[class*="-kpis"]
) > :nth-child(4n + 1){--bimas-final-tone:var(--bimas-brand-blue)!important}

html[data-auth-ready="app"] body[data-route] #app-content#app-content :is(
  .bimas-kpi-grid,.bimas-auto-kpi-strip,.dash-kpi-grid,.ceo-kpi-grid,.ceo-report-grid,
  .pfi-kpi-grid,.reports-hub-kpis,.accounts-kpi-grid,.fgs-kpi-grid,.inv-kpi-grid,
  .inv-overview-kpis,.wip-kpi-grid,.sof-kpi-grid,.fleet-kpi-grid,.drn-kpi-grid,
  .dn-kpi-grid,.voucher-kpi-grid,.notifications-kpi-grid,.prod-dash-kpis,
  [class*="-kpi-grid"],[class*="-metric-grid"],[class*="-stats-grid"],[class*="-kpis"]
) > :nth-child(4n + 2){--bimas-final-tone:var(--bimas-brand-orange)!important}

html[data-auth-ready="app"] body[data-route] #app-content#app-content :is(
  .bimas-kpi-grid,.bimas-auto-kpi-strip,.dash-kpi-grid,.ceo-kpi-grid,.ceo-report-grid,
  .pfi-kpi-grid,.reports-hub-kpis,.accounts-kpi-grid,.fgs-kpi-grid,.inv-kpi-grid,
  .inv-overview-kpis,.wip-kpi-grid,.sof-kpi-grid,.fleet-kpi-grid,.drn-kpi-grid,
  .dn-kpi-grid,.voucher-kpi-grid,.notifications-kpi-grid,.prod-dash-kpis,
  [class*="-kpi-grid"],[class*="-metric-grid"],[class*="-stats-grid"],[class*="-kpis"]
) > :nth-child(4n + 3){--bimas-final-tone:var(--bimas-brand-teal)!important}

html[data-auth-ready="app"] body[data-route] #app-content#app-content :is(
  .bimas-kpi-grid,.bimas-auto-kpi-strip,.dash-kpi-grid,.ceo-kpi-grid,.ceo-report-grid,
  .pfi-kpi-grid,.reports-hub-kpis,.accounts-kpi-grid,.fgs-kpi-grid,.inv-kpi-grid,
  .inv-overview-kpis,.wip-kpi-grid,.sof-kpi-grid,.fleet-kpi-grid,.drn-kpi-grid,
  .dn-kpi-grid,.voucher-kpi-grid,.notifications-kpi-grid,.prod-dash-kpis,
  [class*="-kpi-grid"],[class*="-metric-grid"],[class*="-stats-grid"],[class*="-kpis"]
) > :nth-child(4n){--bimas-final-tone:var(--bimas-brand-navy)!important}

html[data-auth-ready="app"] body[data-route] #app-content#app-content :is(
  .bimas-kpi-icon,.kpi-icon,.metric-icon,.stat-icon,.kicon,.ceo-kpi-icon,
  .ceo-report i,.reports-hub-kpi-icon,.reports-report-kpi-icon,.sales-perf-kpi-icon,
  .accounts-kpi-icon,.fgs-metric-icon,.inv-kpi-icon,.inv-overview-metric-icon,
  .wip-metric-icon,.sof-kpi-icon,.fleet-kpi-icon,.drn-kpi-icon,.dn-kpi-icon,
  .voucher-kpi-icon,.notifications-kpi-icon,.prod-dash-kpi-icon,
  [class*="-kpi-icon"],[class*="-metric-icon"],[class*="-stat-icon"]
){
  width:var(--bimas-kpi-icon-size)!important;
  height:var(--bimas-kpi-icon-size)!important;
  min-width:var(--bimas-kpi-icon-size)!important;
  border-radius:9px!important;
  background:var(--bimas-final-tone,var(--bimas-brand-blue))!important;
  box-shadow:0 7px 15px color-mix(in srgb,var(--bimas-final-tone,var(--bimas-brand-blue)) 22%,transparent)!important;
}

html[data-auth-ready="app"] body[data-route] #app-content#app-content :is(
  .bimas-kpi-icon,.kpi-icon,.metric-icon,.stat-icon,.kicon,.ceo-kpi-icon,
  .ceo-report i,[class*="-kpi-icon"],[class*="-metric-icon"],[class*="-stat-icon"]
) .material-symbols-outlined,
html[data-auth-ready="app"] body[data-route] #app-content#app-content :is(
  .bimas-kpi-icon,.kpi-icon,.metric-icon,.stat-icon,.kicon,.ceo-kpi-icon,
  [class*="-kpi-icon"],[class*="-metric-icon"],[class*="-stat-icon"]
).material-symbols-outlined{
  color:#fff!important;
  font-size:1.25rem!important;
  line-height:1!important;
}

html[data-auth-ready="app"] body[data-route] #app-content#app-content :is(
  .bimas-kpi-label,.kpi-label,.metric-label,.stat-label,.ceo-kpi-label,
  [class*="-kpi-label"],[class*="-metric-label"],[class*="-stat-label"]
){
  color:var(--pro-muted)!important;
  font-size:.68rem!important;
  font-weight:850!important;
  line-height:1.25!important;
  letter-spacing:.045em!important;
  text-transform:uppercase!important;
}

html[data-auth-ready="app"] body[data-route] #app-content#app-content :is(
  .bimas-kpi-value,.kpi-value,.metric-value,.stat-value,.ceo-kpi-value,
  [class*="-kpi-value"],[class*="-metric-value"],[class*="-stat-value"]
){
  color:var(--pro-ink)!important;
  font-size:clamp(1.05rem,1.2vw,1.3rem)!important;
  font-weight:900!important;
  line-height:1.15!important;
  letter-spacing:-.025em!important;
}

html[data-auth-ready="app"] body[data-route] #app-content#app-content :is(
  .bimas-kpi-sub,.kpi-sub,.metric-sub,.stat-sub,.ceo-kpi-sub,
  [class*="-kpi-sub"],[class*="-metric-sub"],[class*="-stat-sub"]
){
  color:color-mix(in srgb,var(--pro-muted) 88%,var(--pro-ink))!important;
  font-size:.66rem!important;
  font-weight:650!important;
  line-height:1.3!important;
  letter-spacing:0!important;
  text-transform:none!important;
}

@media (min-width:1600px){
  :root{--bimas-kpi-min:14.5rem;--bimas-module-gap:1.2rem}
}

@media (min-width:768px) and (max-width:1180px){
  :root{--bimas-kpi-min:12rem;--bimas-kpi-height:100px;--bimas-kpi-icon-size:2.5rem}
}

@media (max-width:767px){
  :root{
    --bimas-module-gap:.7rem;
    --bimas-kpi-height:96px;
    --bimas-kpi-icon-size:2.25rem;
  }

  html[data-auth-ready="app"] body[data-route] #app-content#app-content :is(
    .bimas-kpi-grid,.bimas-auto-kpi-strip,.dash-grid,.dash-kpi-grid,.ceo-kpi-grid,
    .ceo-report-grid,.pfi-kpi-grid,.reports-hub-kpis,.reports-report-kpis,
    .sales-perf-kpis,.accounts-kpi-grid,.fgs-kpi-grid,.inv-kpi-grid,
    .inv-overview-kpis,.wip-kpi-grid,.sof-kpi-grid,.fleet-kpi-grid,.drn-kpi-grid,
    .dn-kpi-grid,.voucher-kpi-grid,.notifications-kpi-grid,.prod-dash-kpis,
    [class*="-kpi-grid"],[class*="-metric-grid"],[class*="-stats-grid"],[class*="-kpis"]
  ){
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }

  html[data-auth-ready="app"] body[data-route] #app-content#app-content :is(
    .bimas-kpi,.bimas-auto-kpi-card,.kpi-card,.stats-card,.stat-card,.dash-kpi,
    .ceo-kpi,.ceo-report,.pfi-metric-card,.reports-hub-kpi,.reports-report-kpi,
    .sales-perf-kpi,.accounts-kpi-card,.fgs-metric-card,.inv-kpi-card,
    .inv-overview-metric-card,.wip-metric-card,.sof-kpi-card,.fleet-kpi-card,
    .drn-kpi-card,.dn-kpi-card,.voucher-kpi-card,.notifications-kpi-card,
    .prod-dash-kpi,[class*="-kpi-card"],[class*="-metric-card"],[class*="-stat-card"]
  ){
    min-height:var(--bimas-kpi-height)!important;
    padding:.7rem!important;
    column-gap:.6rem!important;
    border-left-width:3px!important;
  }

  html[data-auth-ready="app"] body[data-route] #app-content#app-content :is(
    .bimas-kpi-label,.kpi-label,.metric-label,.stat-label,.ceo-kpi-label,
    [class*="-kpi-label"],[class*="-metric-label"],[class*="-stat-label"]
  ){font-size:.61rem!important}

  html[data-auth-ready="app"] body[data-route] #app-content#app-content :is(
    .bimas-kpi-value,.kpi-value,.metric-value,.stat-value,.ceo-kpi-value,
    [class*="-kpi-value"],[class*="-metric-value"],[class*="-stat-value"]
  ){font-size:.98rem!important}

  html[data-auth-ready="app"] body[data-route] #app-content#app-content :is(
    .bimas-kpi-sub,.kpi-sub,.metric-sub,.stat-sub,.ceo-kpi-sub,
    [class*="-kpi-sub"],[class*="-metric-sub"],[class*="-stat-sub"]
  ){font-size:.58rem!important}
}

@media (max-width:360px){
  html[data-auth-ready="app"] body[data-route] #app-content#app-content :is(
    .bimas-kpi-grid,.bimas-auto-kpi-strip,.dash-kpi-grid,.ceo-kpi-grid,
    .ceo-report-grid,.pfi-kpi-grid,[class*="-kpi-grid"],[class*="-metric-grid"],
    [class*="-stats-grid"],[class*="-kpis"]
  ){grid-template-columns:1fr!important}
}
}

/* ================================================================
   BIMAS measured workspace layout
   Uses the available area beside the sidebar without double-offset overflow.
   ================================================================ */
html[data-auth-ready="app"] #app-content{
  box-sizing:border-box!important;
  width:auto!important;
  max-width:none!important;
  margin-left:var(--sidebar-w)!important;
  overflow-x:clip!important;
}

html[data-auth-ready="app"] #app-content > .page-container{
  box-sizing:border-box!important;
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  margin:0!important;
}

html[data-auth-ready="app"] #app-content > .page-container > :is(
  [class*="-shell"],
  [class*="-module"],
  [class*="-dashboard"],
  [class*="-container"]
){
  box-sizing:border-box!important;
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
}

#app-sidebar.sidebar-modern[data-collapsed="true"] ~ #app-content{
  margin-left:4.25rem!important;
}

/* Balanced generic KPI grid for operational modules. */
html[data-auth-ready="app"] body[data-route] #app-content#app-content :is(
  .bimas-kpi-grid,.bimas-auto-kpi-strip,.pfi-kpi-grid,.reports-hub-kpis,
  .reports-report-kpis,.sales-perf-kpis,.accounts-kpi-grid,.fgs-kpi-grid,
  .inv-kpi-grid,.inv-overview-kpis,.wip-kpi-grid,.sof-kpi-grid,
  .fleet-kpi-grid,.drn-kpi-grid,.dn-kpi-grid,.voucher-kpi-grid,
  .notifications-kpi-grid,.prod-dash-kpis,[class*="-metric-grid"],
  [class*="-stats-grid"]
){
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(min(100%,12rem),1fr))!important;
  gap:.75rem!important;
  width:100%!important;
  margin:0 0 1rem!important;
}

html[data-auth-ready="app"] body[data-route] #app-content#app-content :is(
  .bimas-kpi,.bimas-auto-kpi-card,.kpi-card,.stats-card,.stat-card,
  .pfi-metric-card,.reports-hub-kpi,.reports-report-kpi,.sales-perf-kpi,
  .accounts-kpi-card,.fgs-metric-card,.inv-kpi-card,.inv-overview-metric-card,
  .wip-metric-card,.sof-kpi-card,.fleet-kpi-card,.drn-kpi-card,.dn-kpi-card,
  .voucher-kpi-card,.notifications-kpi-card,.prod-dash-kpi,
  [class*="-metric-card"],[class*="-stat-card"]
){
  min-height:5.75rem!important;
  height:auto!important;
  padding:.72rem .78rem!important;
  column-gap:.65rem!important;
  border-radius:9px!important;
}

html[data-auth-ready="app"] body[data-route] #app-content#app-content :is(
  .bimas-kpi-label,.kpi-label,.metric-label,.stat-label,
  [class*="-kpi-label"],[class*="-metric-label"],[class*="-stat-label"]
){font-size:.64rem!important;line-height:1.2!important}

html[data-auth-ready="app"] body[data-route] #app-content#app-content :is(
  .bimas-kpi-value,.kpi-value,.metric-value,.stat-value,
  [class*="-kpi-value"],[class*="-metric-value"],[class*="-stat-value"]
){font-size:1.05rem!important;line-height:1.12!important}

html[data-auth-ready="app"] body[data-route] #app-content#app-content :is(
  .bimas-kpi-sub,.kpi-sub,.metric-sub,.stat-sub,
  [class*="-kpi-sub"],[class*="-metric-sub"],[class*="-stat-sub"]
){font-size:.59rem!important;line-height:1.25!important}

/* Executive dashboard: preserve its purpose-built, spacious proportions. */
html[data-auth-ready="app"] body[data-route="dashboard"] #app-content#app-content .page-container .ceo-shell{
  box-sizing:border-box!important;
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  margin:0!important;
  padding:0!important;
  gap:1rem!important;
  overflow:hidden!important;
  background:transparent!important;
}

html[data-auth-ready="app"] body[data-route="dashboard"] #app-content#app-content .ceo-shell .ceo-hero{
  width:100%!important;
  min-width:0!important;
  min-height:13rem!important;
  grid-template-columns:minmax(0,1.15fr) minmax(20rem,.85fr)!important;
  gap:1.25rem!important;
  padding:1.35rem!important;
}

html[data-auth-ready="app"] body[data-route="dashboard"] #app-content#app-content .ceo-shell .ceo-kpi-grid{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:.75rem!important;
  width:100%!important;
  margin:0!important;
}

html[data-auth-ready="app"] body[data-route="dashboard"] #app-content#app-content .ceo-shell .ceo-kpi{
  min-height:7rem!important;
  height:auto!important;
  grid-template-columns:3rem minmax(0,1fr)!important;
  gap:.85rem!important;
  padding:.9rem 1rem!important;
}

html[data-auth-ready="app"] body[data-route="dashboard"] #app-content#app-content .ceo-shell .ceo-kpi-icon{
  width:3rem!important;
  height:3rem!important;
  min-width:3rem!important;
}

html[data-auth-ready="app"] body[data-route="dashboard"] #app-content#app-content .ceo-shell .ceo-kpi-icon .material-symbols-outlined{
  font-size:1.45rem!important;
}

html[data-auth-ready="app"] body[data-route="dashboard"] #app-content#app-content .ceo-shell .ceo-kpi-label{
  font-size:.68rem!important;
  line-height:1.2!important;
}

html[data-auth-ready="app"] body[data-route="dashboard"] #app-content#app-content .ceo-shell .ceo-kpi-value{
  font-size:1.2rem!important;
  line-height:1.12!important;
}

html[data-auth-ready="app"] body[data-route="dashboard"] #app-content#app-content .ceo-shell .ceo-kpi-sub{
  font-size:.64rem!important;
  line-height:1.25!important;
}

html[data-auth-ready="app"] body[data-route="dashboard"] #app-content#app-content .ceo-shell .ceo-section-intro{
  margin:.1rem 0 -.2rem!important;
}

html[data-auth-ready="app"] body[data-route="dashboard"] #app-content#app-content .ceo-shell .ceo-section-intro h2{
  font-size:1.12rem!important;
  line-height:1.2!important;
}

html[data-auth-ready="app"] body[data-route="dashboard"] #app-content#app-content .ceo-shell .ceo-command-strip{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:.75rem!important;
}

html[data-auth-ready="app"] body[data-route="dashboard"] #app-content#app-content .ceo-shell .ceo-command{
  min-height:4.85rem!important;
  padding:.75rem .8rem!important;
}

html[data-auth-ready="app"] body[data-route="dashboard"] #app-content#app-content .ceo-shell .ceo-command strong{
  font-size:.8rem!important;
}

html[data-auth-ready="app"] body[data-route="dashboard"] #app-content#app-content .ceo-shell .ceo-command span span{
  font-size:.65rem!important;
}

@media (max-width:1180px){
  html[data-auth-ready="app"] body[data-route="dashboard"] #app-content#app-content .ceo-shell .ceo-hero{
    grid-template-columns:1fr!important;
  }

  html[data-auth-ready="app"] body[data-route="dashboard"] #app-content#app-content .ceo-shell .ceo-brief{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
}

@media (max-width:1024px){
  html[data-auth-ready="app"] #app-content{
    width:100%!important;
    margin-left:0!important;
  }

  html[data-auth-ready="app"] body[data-route="dashboard"] #app-content#app-content .ceo-shell .ceo-kpi-grid,
  html[data-auth-ready="app"] body[data-route="dashboard"] #app-content#app-content .ceo-shell .ceo-command-strip{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}

@media (max-width:640px){
  html[data-auth-ready="app"] body[data-route="dashboard"] #app-content#app-content .ceo-shell .ceo-hero{
    min-height:0!important;
    padding:1rem!important;
  }

  html[data-auth-ready="app"] body[data-route="dashboard"] #app-content#app-content .ceo-shell .ceo-brief,
  html[data-auth-ready="app"] body[data-route="dashboard"] #app-content#app-content .ceo-shell .ceo-kpi-grid,
  html[data-auth-ready="app"] body[data-route="dashboard"] #app-content#app-content .ceo-shell .ceo-command-strip{
    grid-template-columns:1fr!important;
  }
}
