/* Mobile readability: load after desktop and component styles. */
@media(max-width:767px){
  .workspace-dashboard-page .welcome-banner{display:flex!important;flex-direction:column!important;align-items:stretch!important;height:auto!important;min-height:0!important;padding:18px!important;gap:16px;overflow:hidden}
  .dashboard-premium .welcome-text{width:100%;min-width:0}
  .dashboard-premium .welcome-title{font-size:20px!important;line-height:1.5!important;height:auto!important;white-space:normal!important;overflow-wrap:anywhere}
  .dashboard-premium .welcome-desc{max-width:none!important;line-height:1.7!important;white-space:normal!important;overflow-wrap:anywhere}
  .dashboard-premium .welcome-stats{position:relative!important;inset:auto!important;width:100%;display:flex!important;flex-wrap:wrap;gap:8px!important}
  .dashboard-premium .welcome-stat{flex:1 1 90px;min-width:0!important}
  .dashboard-premium .welcome-stat-num,.dashboard-premium .welcome-stat-label{display:block!important;line-height:1.5!important}
  .dashboard-premium .welcome-stat-num{font-size:18px!important}
  .dashboard-premium .welcome-stat-num:after{content:none}
  #content .stat-card .label,#content .stat-card .value,#content .stat-card .sub{width:100%;height:auto!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;overflow-wrap:anywhere;line-height:1.55!important}
  #content .stat-card .value{font-size:20px!important}
  #content .stat-card .sub{display:block!important;font-size:12px!important}
  .dashboard-premium .management-dashboard-head{flex-direction:column!important;gap:12px}
  .management-dashboard-head>div,.management-dashboard-head .btn{max-width:100%;min-width:0}
  .management-dashboard-head h2,.management-dashboard-head p{line-height:1.6!important;overflow-wrap:anywhere}
  .management-metric-grid,.dashboard-goal-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .management-metric,.dashboard-goal-metric{min-width:0;min-height:0!important;height:auto!important;padding:14px!important;overflow-wrap:anywhere}
  .management-metric span,.management-metric strong,.management-metric small,.dashboard-goal-metric strong{white-space:normal!important;line-height:1.6!important;overflow-wrap:anywhere}
  .management-metric strong{font-size:19px!important}
  .management-checks{grid-template-columns:1fr!important}
  .management-checks button,.management-check{flex-wrap:wrap;line-height:1.6;min-width:0}
  .management-unassigned-check{flex-direction:column;align-items:stretch!important}
  .management-unassigned-check select{width:100%;min-width:0!important;max-width:100%!important;height:40px}
  .dashboard-goals-actions{flex-wrap:wrap}
  .dashboard-goals-actions select{min-width:0}
  .dashboard-premium .card-title{height:auto!important;min-height:0!important;flex-wrap:wrap;gap:8px;padding:14px!important;line-height:1.6}
  .dashboard-premium .todo-header{flex-wrap:wrap;gap:8px}
  .dashboard-premium .todo-item{white-space:normal!important;height:auto!important;overflow:visible!important;text-overflow:clip!important;line-height:1.7!important;overflow-wrap:anywhere}
  .dashboard-premium .quick-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px!important}
  .dashboard-premium .quick-item:nth-child(n+6){display:flex!important}
  .dashboard-premium .quick-label{white-space:normal!important;overflow:visible!important;text-overflow:clip!important;line-height:1.6}
  .mobile-summary-main{display:grid!important;grid-template-columns:minmax(0,1fr);gap:8px}
  .mobile-summary-main strong,.mobile-summary-main small{white-space:normal!important;line-height:1.7!important;overflow-wrap:anywhere}
  .mobile-summary-amount{white-space:normal!important;overflow-wrap:anywhere;font-size:17px!important;line-height:1.6}
  .mobile-summary-meta{display:grid!important;grid-template-columns:minmax(0,1fr);gap:6px}
  .mobile-summary-meta span{display:block;max-width:100%;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;line-height:1.7;padding:7px 9px}
  .modal h3,.detail-section h4,.detail-item .label,.detail-item .value{height:auto!important;white-space:normal!important;line-height:1.7!important;overflow-wrap:anywhere}
  .detail-grid{grid-template-columns:minmax(0,1fr)!important;gap:14px!important}
  .detail-item{min-width:0;padding-bottom:8px;border-bottom:1px solid #edf2f7}
  .detail-item .value{font-size:15px}
  .detail-section{min-width:0;overflow-wrap:anywhere}
  .detail-section table{width:100%!important;min-width:0!important;table-layout:fixed}
  .detail-section th,.detail-section td{white-space:normal!important;overflow-wrap:anywhere;padding:8px 5px!important;font-size:12px;line-height:1.6}
  .timeline .content{padding:0!important;overflow:visible!important;background:transparent!important;min-height:0}
  .modal-actions{position:static!important;flex-wrap:wrap;line-height:1.5}
  .modal-actions button{white-space:normal!important;line-height:1.5;overflow-wrap:anywhere}
  .fund-summary-grid strong,.annual-stat-card strong,.annual-financial-card strong{white-space:normal!important;overflow-wrap:anywhere;line-height:1.5!important}
}
@media(max-width:430px){
  #content .stats-grid,#content .dashboard-stats-grid,#content.content>.stats-grid,.management-metric-grid,.dashboard-goal-grid,.annual-stat-grid,.annual-financial-grid,.fund-summary-grid{grid-template-columns:minmax(0,1fr)!important}
}


/* Measurement detail: distinct labels, wrapping content, accessible attachments. */
.measurement-detail .modal-body{display:block!important;padding:24px!important}
.measurement-detail-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:24px}
.measurement-detail-heading small{color:#718096}.measurement-detail-heading h4{margin:8px 0 0;font-size:19px;line-height:1.5;overflow-wrap:anywhere}
.measurement-detail-heading .badge{flex-shrink:0;padding:7px 10px;background:#edf4ff;color:#245db5;border-radius:6px}
.measurement-detail section{border-top:1px solid #e8edf4;padding-top:18px;margin-top:20px}.measurement-detail section>h4{font-size:14px;margin:0 0 14px;color:#24374d}.measurement-detail section>h4 small{color:#8290a3;font-weight:400;margin-left:8px}
.measurement-detail-fields{display:grid;grid-template-columns:1fr 1fr;gap:18px 28px;margin:0}.measurement-detail-notes{display:grid;gap:16px;margin:0}
.measurement-detail-field{min-width:0}.measurement-detail-field dt{color:#7a8797;font-size:13px;margin:0 0 6px}.measurement-detail-field dd{margin:0;color:#233247;font-size:14px;line-height:1.7;white-space:pre-wrap;overflow-wrap:anywhere}
.measurement-detail .attachment-gallery{width:100%;min-width:0}.service-field-help{display:block;color:#718096;font-size:12px;line-height:1.65;margin-top:7px}
.payment-filters select{max-width:100%;min-width:180px}.payment-filters .table-toolbar{flex-wrap:wrap;gap:12px;padding-bottom:0}
@media(max-width:600px){.measurement-detail .modal-body{padding:18px!important}.measurement-detail-heading{flex-direction:column;gap:10px}.measurement-detail-fields{gap:16px}.payment-filters .table-toolbar>*{width:100%;min-width:0}}
