/* Responsive and legibility fixes. Loaded last; only sizes and layout, never colors or fonts. */

/* 1. Text size: the desktop view was scaled to 80% (portal.css), which left most text at 8-11px. */
@media (min-width:851px){@supports (zoom:1){html{zoom:1}}}

/* 2. Login / MFA: the image panel grew wider than its column (aspect-ratio + min-height)
      and the form overlapped it whenever the window was narrower than ~1.8x its height. */
@media (min-width:851px){
  .login-shell{grid-template-columns:minmax(0,1fr) minmax(0,1fr);min-height:0}
  /* Fill the row; at least the image's own proportion (half of an 80vw shell x 8192/7486). */
  .welcome-panel{aspect-ratio:auto;min-height:43.8vw}
}
@media (min-width:851px) and (max-width:1100px){
  .login-shell{width:92vw}
  .welcome-panel{min-height:50.3vw}
  .form-panel{padding:40px 34px}
}

/* 3. Minimum legible sizes for the texts that stayed under 12px (labels, pills, meta). */
.breadcrumbs,.breadcrumbs a,.breadcrumbs span,.detail-meta,.text-link,
.section-heading a,.section-heading a span{font-size:12px!important}
.eyebrow{font-size:11px!important}
.muted,.empty-state,.balance-card>span,.login-demo-note{font-size:13px!important}
.channel-pill,.state-pill{font-size:12px!important}
.send-actions .button,.qr-card .button,.page-heading>.button{font-size:13px!important}
.batch-table th,.batch-table td{font-size:13px!important}
.sidebar-bottom{font-size:13px}
.sidebar-bottom small,.sidebar-bottom button{font-size:12px}

/* 4. Phones. */
@media (max-width:850px){
  /* iOS Safari zooms the whole page when a field under 16px gets focus. */
  input,select,textarea{font-size:16px!important}
}
@media (max-width:520px){
  .topbar-heading{min-width:0}
  .topbar-heading strong,.topbar-heading span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .topbar-heading strong{font-size:15px}
  .topbar-heading span{font-size:11px}
  .clock,.date{display:none}
  .topbar-right{padding-left:0}
  .topbar-right:before{display:none}
  .stat-card small{font-size:13px}
}

/* 5. "Rol" field (new user): the select had no styles; same look as the other fields. */
.user-fields select{display:block;width:100%;height:60px;margin-top:7px;padding:0 14px;border:1px solid #d2d2d0;border-radius:10px;background:#fff;color:#24362b;font:500 17px "DM Sans",Arial,sans-serif;outline:0;box-shadow:0 1px 2px #00000008}
.user-fields select:focus{border-color:#19804a;box-shadow:0 0 0 3px #087d6319}
.user-fields label>small{display:block;margin-top:6px;color:#758078;font-size:13px;font-weight:500}
@media (max-width:850px){.user-fields select{height:50px}}

/* 6. Settings: the save button collapsed to a thin bar on phones (flex:1 in a column). */
@media (max-width:760px){.settings-submit .create-button{flex:none}}

/* 7. Dashboard cards: four columns do not fit next to the sidebar on narrow desktop windows. */
@media (min-width:851px) and (max-width:980px){.stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
