/* Foldoo Stage 54D: iPad and tablet dashboard layout. Dashboard only. */
/* Prevent intrinsic content widths from forcing a horizontal viewport. */
.dashboard-shell .dashboard-content-grid,
.dashboard-shell .dashboard-main-column,
.dashboard-shell .dashboard-rail,
.dashboard-shell .dashboard-side-card {min-width:0;max-width:100%;box-sizing:border-box}
.dashboard-shell .dashboard-side-card {overflow-wrap:anywhere}
.dashboard-shell .dashboard-ai-card .ui-btn {max-width:100%;white-space:normal;overflow-wrap:anywhere;text-align:center}
.dashboard-shell .f54b-task {min-width:0}
.dashboard-shell .f54b-task>span:nth-child(2) {overflow-wrap:anywhere}
/* Landscape iPads and medium-width laptops: don't squeeze a two-column utility rail
   into the already narrow right side of the desktop content grid. */
@media (min-width:641px) and (max-width:1366px) {
  .dashboard-shell .dashboard-content-grid {grid-template-columns:minmax(0,1fr)!important;gap:25px!important}
  .dashboard-shell .dashboard-rail {position:static!important;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:16px!important;align-items:stretch}
  .dashboard-shell .dashboard-rail>.dashboard-side-card {grid-column:auto!important;min-width:0;width:100%;margin:0}
  .dashboard-shell .dashboard-rail>.dashboard-ai-card {order:1}
  .dashboard-shell .dashboard-rail>.f54b-side-checklist {order:2}
  .dashboard-shell .dashboard-rail>.dashboard-quick-card {order:3}
  .dashboard-shell .dashboard-rail>.dashboard-announcements-card {order:4}
  .dashboard-shell .dashboard-rail>.dashboard-side-card:last-child {grid-column:auto!important}
  .dashboard-shell .dashboard-side-card {padding:17px!important}
  .dashboard-shell .dashboard-topbar .dashboard-search {min-width:0}
  .dashboard-shell .browser-projects.ui-dash-grid.dashboard-project-grid:not(.is-list) {grid-template-columns:repeat(auto-fill,minmax(min(100%,235px),1fr))!important}
}
/* Tablet portrait and compact screens: generous, non-overlapping utility cards. */
@media(max-width:760px){
  .dashboard-shell .dashboard-content-grid {grid-template-columns:minmax(0,1fr)!important}
  .dashboard-shell .dashboard-rail {position:static!important;grid-template-columns:minmax(0,1fr)!important}
  .dashboard-shell .dashboard-rail>.dashboard-side-card,
  .dashboard-shell .dashboard-rail>.dashboard-side-card:last-child {grid-column:1/-1!important}
  .dashboard-shell .dashboard-greeting {flex-wrap:wrap;gap:12px}
  .dashboard-shell .dashboard-greeting-side {justify-items:start}
}
/* iPad touch affordances without forcing desktop mouse targets to grow. */
@media (pointer:coarse){
  .dashboard-shell .dashboard-quick-link {min-height:44px}
  .dashboard-shell .dashboard-ai-card .ui-btn {min-height:44px}
  .dashboard-shell .dashboard-rail .ui-linkbtn {min-height:44px}
  .dashboard-shell .browser-project-tools {opacity:1;pointer-events:auto;transform:none}
}
