/* IMARIA v16.4.1 — Mobile Actions & Compact Layout
   Mobile-only refinement. Desktop layout and permissions unchanged. */
@media(max-width:700px){
  /* Keep management creation actions available on phones without crowding header. */
  .portal-topbar #newProjectBtn:not(.hidden),
  .portal-topbar #newTaskBtn:not(.hidden){
    display:inline-flex!important;
    position:fixed;
    right:16px;
    z-index:1450;
    width:auto;
    min-width:112px;
    min-height:46px;
    justify-content:center;
    align-items:center;
    border-radius:14px;
    box-shadow:0 10px 28px rgba(11,45,79,.22);
    font-size:14px;
    font-weight:800;
  }
  .portal-topbar #newProjectBtn:not(.hidden){bottom:18px;background:#0b2d4f;color:#fff;border-color:#0b2d4f}
  .portal-topbar #newTaskBtn:not(.hidden){bottom:72px;background:#fff;color:#0b2d4f;border-color:#cbd5e1}
  .content{padding-bottom:138px!important}

  /* Compact KPI cards: information first, less scrolling. */
  .metrics,.executive-metrics{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important}
  .metric,.executive-metric{min-height:132px!important;padding:14px!important;display:flex;flex-direction:column;justify-content:flex-start}
  .executive-metric .metric-icon{width:32px;height:32px;margin-bottom:8px}
  .metric span,.executive-metric>span{font-size:12px;line-height:1.25}
  .metric strong{font-size:28px;line-height:1.05;margin-top:8px}
  .metric small{font-size:11px;margin-top:4px}

  /* Project and department action bars wrap cleanly rather than clipping. */
  .section-head{gap:10px}
  .section-head .project-actions{display:flex;flex-wrap:wrap;gap:8px}
  .section-head .project-actions .btn{flex:1 1 auto}
  .department-actions,.department-action-bar{display:flex!important;flex-wrap:wrap!important;gap:8px!important}
  .department-actions .btn,.department-action-bar .btn{width:auto!important;flex:1 1 145px;min-height:44px}
}

@media(max-width:390px){
  .metrics,.executive-metrics{gap:9px!important}
  .metric,.executive-metric{min-height:122px!important;padding:12px!important}
  .portal-topbar #newProjectBtn:not(.hidden),.portal-topbar #newTaskBtn:not(.hidden){right:12px;min-width:104px}
}
