/* Ajustes para móvil comunes a dashboard.html y comercial.html */
@media(max-width:720px),(max-height:500px) and (max-width:1000px) and (orientation:landscape){
  /* Ventana emergente de detalle: hoja a pantalla casi completa */
  #deals-modal{align-items:flex-end!important}
  #deals-modal>div{width:100%!important;max-height:92vh!important;border-radius:16px 16px 0 0!important}
  #deals-modal>div>div:first-child{padding:12px 14px!important;gap:8px}
  #deals-modal-title{font-size:13px!important;line-height:1.3}
  #deals-modal>div>div:first-child button{padding:6px 10px!important;font-size:12px!important}
  #deals-modal-sub{padding:8px 14px 4px!important;font-size:12px!important}
  #deals-modal-table{font-size:12px!important}
  #deals-modal-table td,#deals-modal-table th{padding:7px 8px!important}
  #deals-modal-table td:first-child{white-space:normal!important;min-width:120px;max-width:150px}
  /* Tablas de métricas por mes: primera columna fija al desplazar */
  .tbl th:first-child,.tbl td:first-child{position:sticky;left:0;background:var(--card,#fff);z-index:1;min-width:92px;box-shadow:1px 0 0 var(--bd,#e5e7eb)}
  .tbl th:first-child{background:#f3f4f6}
  .tbl td{white-space:nowrap}
  .tbl td:first-child{white-space:normal}
}
@media(max-width:720px),(max-height:500px) and (max-width:1000px) and (orientation:landscape){
  /* Fila del selector de fechas + "Volver al menú": el selector ocupa todo el ancho */
  .standalone-switch .sw-rp{flex:1 1 100%;display:flex}
  .standalone-switch .sw-rp[hidden]{display:none}
  .standalone-switch .sw-rp .rp{width:100%;display:flex}
  .standalone-switch .sw-rp .rp-btn{flex:1;justify-content:center}
}
